Skip to main content

A novel multi-branch hypothesis evaluation system

Project description

False Feet Algorithm

Amoeba: Novel Multi-Branch Hypothesis Evaluation with Inverse Resource Allocation

A Python library for solving complex reasoning problems through competitive multi-branch investigation. The algorithm forces weak hypotheses to strengthen or die off by allocating MORE resources to them, not less. When multiple independent reasoning paths converge on the same answer, that's a robust signal.

Quick Start

pip install false-feet-algorithm

Run the examples:

python -m false_feet_algorithm.examples.mystery_solving
python -m false_feet_algorithm.examples.clinical_diagnosis

How It Works

The 6-phase algorithm repeats until convergence:

  1. Investigation — Branches evaluate current evidence
  2. Evaluation — Score each hypothesis (0-1)
  3. Resource AllocationINVERSE ranking (weakest gets most resources!)
  4. Evidence Gathering — Branches propose new evidence to test
  5. Starvation & Culling — Non-improving branches die off
  6. Convergence Check — All branches agree? → Problem solved

Use It for Your Domain

Extend the framework with your own hypothesis evaluation logic:

from false_feet_algorithm.core import Problem, Option, DataPoint, BaseBranch, BaseEvaluator, AmoebaInvestigation

class YourBranch(BaseBranch):
    def evaluate(self, data_pool):
        # Your domain-specific reasoning
        return score  # 0.0-1.0
    
    def propose_data(self, data_pool):
        # Suggest the next evidence to gather
        return proposed_evidence_ids

class YourEvaluator(BaseEvaluator):
    def evaluate(self, branch, data_pool):
        # Your scoring logic
        return score

# Set up the problem
problem = Problem(title="My Problem")
problem.add_option(Option("hypothesis_1"))
problem.add_option(Option("hypothesis_2"))
# ... add evidence ...

# Solve it
solver = AmoebaInvestigation(
    problem,
    branch_class=YourBranch,
    evaluator=YourEvaluator()
)
result = solver.solve()
print(f"Best hypothesis: {result.option.id}")

Examples Included

  • Mystery Solving — Classic logic puzzle (identify the culprit from clues)
  • Medical Diagnosis — Differential diagnosis from symptoms and tests

Visualization (Optional)

Install with visualization support:

pip install false-feet-algorithm[viz]

Then use the built-in plotting utilities to visualize algorithm convergence.

Features

  • ✅ Pure Python, minimal dependencies
  • ✅ Generic framework for any hypothesis evaluation problem
  • ✅ 39 comprehensive tests (Python 3.8+)
  • ✅ Optional matplotlib visualization
  • ✅ Well-documented API with examples

Testing

pytest

License

MIT License

Learn More

For the complete algorithm specification and C++ reference implementation, see the GitHub repository.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

false_feet_algorithm-0.1.1.tar.gz (24.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

false_feet_algorithm-0.1.1-py3-none-any.whl (28.2 kB view details)

Uploaded Python 3

File details

Details for the file false_feet_algorithm-0.1.1.tar.gz.

File metadata

  • Download URL: false_feet_algorithm-0.1.1.tar.gz
  • Upload date:
  • Size: 24.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for false_feet_algorithm-0.1.1.tar.gz
Algorithm Hash digest
SHA256 acaaee7edeb78d581f7eecd6ff95e65bc2c45822bc6739acacc166b2172f6e27
MD5 683fa979d25d5451742089798d0ecffa
BLAKE2b-256 88ad20ed2e864adea0f6c18df7daad918fcc59db9d3af522b78ad9e241a51a33

See more details on using hashes here.

File details

Details for the file false_feet_algorithm-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for false_feet_algorithm-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 494551a5b47aa8f15790116a5706501903920de691251f16da7ac492b55e0236
MD5 a0ae8de603985099ded35482dc76511d
BLAKE2b-256 72190efcf2e2dfcdff857696104aa379dafc796d8ef84ba794275bf0288988ec

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page