duck-dynasty / duckbot

A Discord bot for personal friend group
GNU General Public License v3.0
9 stars 10 forks source link

🔧 weigh item usage by rough raw resource cost in objective function #961

Closed twentylemon closed 2 months ago

twentylemon commented 2 months ago
Summary

Fixes https://github.com/duck-dynasty/duckbot/issues/958. The objective function is mostly unchanged by looking at it, but it should consider iron plates to be 1.5x more costly than iron ore, for example; instead of merely counting the rate of items produced. I wasn't able to think of a test case to show the theoretical bad behaviour. I may add some test cases in the future, or as we run into weird solves.

also fixed a bug in a recipe. #python.

Checklist
codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 79.06977% with 9 lines in your changes missing coverage. Please review.

Project coverage is 95.99%. Comparing base (33a2a26) to head (bd868a6). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
duckbot/cogs/games/satisfy/solver.py 79.06% 0 Missing and 9 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #961 +/- ## ========================================== - Coverage 96.35% 95.99% -0.37% ========================================== Files 92 92 Lines 2115 2149 +34 Branches 234 252 +18 ========================================== + Hits 2038 2063 +25 Misses 65 65 - Partials 12 21 +9 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.