Skip to content
ElysionLhantPublic

About

Unofficial Forza Horizon setup planner and A/B test toolkit for drivers and AI agents

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

setup-lab

Unofficial Forza Horizon setup planner and A/B test toolkit for drivers and AI agents.

Plan gearing, tire pressure, brake balance and other setup changes, compare them under identical conditions, and analyze real lap records without losing the rollback values. MIT-licensed, with no runtime dependencies.

Python 3.11+ · no runtime dependencies · no proprietary datasets

This repository provides deterministic scalar formulas, candidate generation, A-B-A analysis and optimality certificates. It is not a complete vehicle rating calculator or lap simulator. Unsupported operations are listed explicitly instead of being estimated.

What you can use it for

  • Build a small, deterministic list of setup candidates instead of guessing one “best” build.
  • Compare final-drive and individual gear ratios, tire pressures, brake balance and related setup changes.
  • Run baseline → candidate → baseline experiments and see best lap, median, consistency and off-track cost.
  • Separate “faster and repeatable” from “fast once but harder to drive”.
  • Give an AI agent a concrete JSON workflow for planning tests and reporting evidence.

It is useful even without a simulator: you can bring your own model results or measured laps. It does not pretend to be a complete vehicle rating calculator or lap simulator.

Included

  • Binary32-ordered tire, brake, center-of-mass and wheel-mass formulas.
  • A 26-row binned braking-table replay and straight-remaining predicate.
  • Deterministic single-variable and combination candidate plans with limits and budgets.
  • A-B-A valid-lap analysis, baseline drift and stability reporting.
  • Pareto fronts, budget-limited certificates and exhaustive finite-domain certificates.
  • A vehicle setup experiment guide for agents.

See src/setup_lab/capabilities.json and MISSING.md before requesting ratings, lap simulations or hardware-specific optimization.

Quick start

python -m pip install .
setup-lab capabilities
setup-lab physics examples/physics_tire.json
setup-lab plan examples/plan.json
setup-lab analyze examples/aba.json

Without installation:

PYTHONPATH=src python -m setup_lab capabilities

PowerShell:

$env:PYTHONPATH = "src"
py -m setup_lab capabilities

Every data command accepts - as the JSON input path for stdin.

Scalar physics

setup-lab physics examples/physics_tire.json
# {"inertia": 0.5391262769699097, "mass": 7.624475002288818}

Input example:

{
  "operation": "tire_carcass",
  "args": {"width_mm": 185, "aspect": 60, "wheel_diameter_in": 14}
}

The functions validate inputs and preserve explicit binary32 operation order. They cover only the named scalar formulas and do not reconstruct a complete vehicle.

Candidate plan

examples/plan.json produces one baseline, three single-variable candidates and two combinations. Candidate IDs and plan hashes are deterministic. planned_not_evaluated means the plan has not been run through an evaluator.

A-B-A analysis

setup-lab analyze examples/aba.json

The example is synthetic and reports E0_unverified_run_data. For genuine measured runs, set:

{
  "runs_verified": true,
  "data_provenance": "Driver, event, conditions and recording date",
  "stability_not_worse": true
}

Invalid, off-track, non-finite and nonpositive laps never become fast scores. A fast best lap with worse consistency is labeled separately from a repeatable improvement.

Braking helper

from setup_lab.track import binned_brake_time_and_distance

seconds, meters = binned_brake_time_and_distance(speed_table, low_speed, high_speed)

The caller supplies exactly 26 rows with at least eight finite columns. Columns 6 and 7 are used for time and distance. No captured table is bundled.

Python API

from setup_lab import (
    analyze_aba,
    best_found_certificate,
    exhaustive_certificate,
    generate_candidates,
    pareto_front,
)
  • best_found_under_budget never claims a global optimum.
  • exhaustive_global_optimum requires one unique result for every finite-domain entry, with valid or rejected status and finite positive valid laps.
  • Pareto comparisons require every candidate to have every declared finite metric.

Tests

PYTHONPATH=src python -B -m unittest discover -s tests -v

Tests use scalar regression vectors and synthetic experiments only. No private database, binary asset or network access is needed.

Agents should start with AGENTS.md and docs/EXPERIMENT_GUIDE.md. The design rationale and validation method are in docs/METHODOLOGY.md.

Trademark and independence

Forza and Forza Horizon are trademarks of the Microsoft group of companies.

This independent project is not affiliated with, endorsed by, or sponsored by Microsoft, Turn 10 Studios, or Playground Games. No game code, assets, logos, or user data are included.

License

MIT. See LICENSE and docs/PROVENANCE.md.

About

Unofficial Forza Horizon setup planner and A/B test toolkit for drivers and AI agents

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages