Skip to content

[Draft] 349 feat simulated annealing#380

Draft
amarshah1999 wants to merge 17 commits into
Alek050:developfrom
amarshah1999:349-feat-simulated-annealing
Draft

[Draft] 349 feat simulated annealing#380
amarshah1999 wants to merge 17 commits into
Alek050:developfrom
amarshah1999:349-feat-simulated-annealing

Conversation

@amarshah1999
Copy link
Copy Markdown

@amarshah1999 amarshah1999 commented May 7, 2026

[Draft] Introduces the simulated annealing project as outlined here #349

ToDo List:

  • Replace Tester file with actual docs and a sample notebook
  • Add unit test
  • Create a visualisation function to show the changes that the algorithm makes to player positions (and then undo my changes in visualize.py)

amarshah1999 and others added 13 commits March 8, 2026 20:44
- Working commit
- Introduces new base classes, and simulated annealing itself
- Temporary tester file
- Created a re-usable ObjectiveTerm function which takes in at least an input frame and computes a float from it
- Used these reusable objectives and weights in the SimulatedAnnealing class to compute the objective
- Adds a class for generic constraints, which can be computed to check validity based on an input frame and player id
- Implemented a specific constraint for simulated annealing that ensures the player is within a TimeToIntercept radius, i.e. the perturbation from simulated annealing is such that the player could get there within X seconds.
- Makes a minor addition of an alpha parameter to visualize.py also
- Move optimization objects into separate classes
- Add logging properly instead of print statements
- Formatting
Creates a wrapper function around the Algorithm.run() method that can easily be extended to hot swap optimization algorithms
@amarshah1999 amarshah1999 marked this pull request as draft May 7, 2026 19:27
@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.28%. Comparing base (e4ce2b3) to head (b53cc9f).
⚠️ Report is 89 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #380      +/-   ##
===========================================
+ Coverage    99.22%   99.28%   +0.05%     
===========================================
  Files           49       67      +18     
  Lines         3736     5441    +1705     
===========================================
+ Hits          3707     5402    +1695     
- Misses          29       39      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

- Previously I was trying to save compute by only passing in what is necessary
- It's much cleaner to use if all the constraints and objectives just take in game, frame and some optional extra arguments.
- I will revisit this if we want to make the pre-made objectives a bit more flexible
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant