Skip to main content

FFFA: Food Finding Foxes Algorithm

PyPI Version License Downloads Python Versions GitHub Stars Last Commit Open Issues

FFFA is a nature-inspired single-solution optimization algorithm that mimics the foraging behavior of foxes.
It is designed for solving path optimization problems (e.g., shortest path, graph-based problems) where a weight matrix is provided as input.


Installation

You can install FFFA directly from PyPI (after publishing):

pip install fffa

Usage Example

from fffa import fff

Example weighted adjacency matrix

weight_matrix = [
    [0, 2, 9, 0],
    [1, 0, 6, 4],
    [0, 7, 0, 8],
    [6, 3, 0, 0]
]

best_path, best_cost = fff(weight_matrix)

print("Best Path:", best_path)
print("Best Cost:", best_cost)

Features

Nature-inspired single-solution optimization algorithm

Works with any weighted adjacency matrix

Simple API with minimal dependencies

Lightweight and easy to integrate

Project Structure

FFFA/
│── fffa/                 # Main package
│   ├── __init__.py
│   ├── fff.py            # Main algorithm
│   ├── update.py         # Helper functions
│── tests/                # Test cases
│   └── test.py
│── requirements.txt      # Dependencies
│── README.md             # Documentation
│── setup.py              # Packaging setup
│── LICENSE

License

This project is licensed under the MIT License - see the LICENSE file for details.

Release files for fffa 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fffa 0.1.1
File Size Uploaded
fffa-0.1.1.tar.gz 5.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fffa 0.1.1
File Interpreter ABI Platform
fffa-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 12.2 kB

Release files / fffa-0.1.1.tar.gz

Download URL fffa-0.1.1.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ed5a2f0448b4a4b1c1d8f7da9f3fbaf0b91d83c7aad496eb06618358c318de58
BLAKE2b-256 checksum
How to use checksums
8baab897f616cea7297874b289dbee2798714790e4246718e4d4274fa23181bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / fffa-0.1.1-py3-none-any.whl

Download URL fffa-0.1.1-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
81680fc47019ad7ea54eef0eda00af5d6449b6fc610023d684882756cb945d38
BLAKE2b-256 checksum
How to use checksums
fc554783204e96e5a1a66c10f089fe8d1cda59b63f9167197e11a335a58868fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page