Skip to content

Hannah bot improvement#95

Closed
HannahSophie08 wants to merge 13 commits into
TBIAPBC:mainfrom
HannahSophie08:hannah_bot-improvement
Closed

Hannah bot improvement#95
HannahSophie08 wants to merge 13 commits into
TBIAPBC:mainfrom
HannahSophie08:hannah_bot-improvement

Conversation

@HannahSophie08

Copy link
Copy Markdown
Collaborator

Hey, I added a new bot called r1 (round3_v1) based on the round 2 bot. Here is what I changed:

  • choose exploration move function looked for tiles not visited yet , so I changed it to unknown tiles. Through that the bot doesn't need to actually visit each tile
  • if no path to gold can be found with danger active, retries without danger
  • in maps and caves the bot tended to oscillate and get stuck, I included a function "is_oscillating" that checks for that and if the bot is stuck sprints away from that location (10 steps and ignoring danger)
  • I replaced the old exploration function with a new one that counts unknown tiles within the visibility range around each possible next tile, so the bot only moves during exploration when it would actually reveal new information
  • I lowered the sprint threshold in the early rounds from 30 to 10
  • I removed am_i_closest to make the bot still try when someone else is closer as we could still be faster when we sprint
  • whether the gold can be reached is now calculated including sprints and not only single steps

I testes this with 10 games per map with 1000 rounds each (the bot I pushed is r1):

Benchmark results (QUICK_TEST=False)
N_GAMES_PER_MAP = 10, ROUNDS = 1000

--- random ---
bot wins win% mean median stdev min max

Test 0 0.0% 238.6 174.5 167.3 99 549
Beatme 0 0.0% 862.4 727.5 295.0 590 1376
Round2 bot 0 0.0% 1251.0 1360.5 354.1 692 1873
Scout 5 0 0.0% 1365.7 1232.0 549.5 542 2117
r1 10 100.0% 7437.2 7375.5 1395.0 5493 9393
r2 0 0.0% 685.5 463.0 655.7 1 2119

--- maze_map ---
bot wins win% mean median stdev min max

Test 0 0.0% 324.8 371.0 157.2 99 536
Beatme 6 60.0% 1798.0 1784.5 385.0 1317 2519
Round2 bot 2 20.0% 1246.4 1145.0 454.6 463 1931
Scout 5 2 20.0% 1271.2 1010.5 613.3 744 2546
r1 0 0.0% 368.2 31.0 546.1 2 1369
r2 0 0.0% 219.8 179.5 262.2 2 897

--- floodfill_map ---
bot wins win% mean median stdev min max

Test 0 0.0% 177.2 99.0 102.1 99 324
Beatme 0 0.0% 383.3 342.5 126.4 249 659
Round2 bot 0 0.0% 1315.1 1325.5 373.2 773 2160
Scout 5 0 0.0% 892.4 1048.5 828.2 27 2322
r1 10 100.0% 11529.2 11091.5 1134.6 10236 13632
r2 0 0.0% 483.7 176.0 542.3 4 1495

--- inverse_floodfill_map ---
bot wins win% mean median stdev min max

Test 0 0.0% 385.1 383.0 213.4 99 825
Beatme 1 10.0% 2096.9 2070.5 479.9 1224 2775
Round2 bot 3 30.0% 2388.1 2253.0 514.3 1777 3220
Scout 5 4 40.0% 2268.6 2190.5 389.5 1684 2749
r1 2 20.0% 872.3 181.5 1413.3 0 3864
r2 0 0.0% 154.2 69.0 213.3 1 642

--- random_coverage_map ---
bot wins win% mean median stdev min max

Test 0 0.0% 196.0 172.0 108.0 99 379
Beatme 0 0.0% 561.2 643.5 174.3 239 739
Round2 bot 0 0.0% 1367.3 1208.0 594.8 776 2861
Scout 5 0 0.0% 513.2 445.0 493.8 27 1174
r1 10 100.0% 10698.8 10804.0 1311.9 8542 12450
r2 0 0.0% 649.9 530.5 591.7 0 1692

--- mazes_and_caves ---
bot wins win% mean median stdev min max

Test 0 0.0% 237.4 236.0 108.9 99 369
Beatme 9 90.0% 1568.5 1514.0 395.7 1063 2335
Round2 bot 0 0.0% 498.8 528.5 215.4 99 783
Scout 5 0 0.0% 532.9 481.0 200.3 291 896
r1 1 10.0% 382.4 4.5 895.9 0 2895
r2 0 0.0% 11.9 4.5 26.1 0 86

=== OVERALL (60 games) ===
bot wins win% mean median stdev min max

Test 0 0.0% 259.9 255.0 159.8 99 825
Beatme 16 26.7% 1211.7 1153.5 723.4 239 2775
Round2 bot 5 8.3% 1344.5 1285.5 694.6 99 3220
Scout 5 6 10.0% 1140.7 954.0 800.9 27 2749
r1 33 55.0% 5214.7 4678.5 5005.6 0 13632
r2 0 0.0% 367.5 141.0 497.2 0 2119

Total runtime: 1432.7s

The bot performs poorly in the maze map and the maze and caves map. A next step would be to further look into that.

HannahSophie08 and others added 13 commits May 5, 2026 14:35
Added sections for variable names, movement directions, and path calculation.
Clarified the status of the crash avoidance feature in the documentation.
Implemented new strategies for tile safety assessment and gold selection, enhancing tactical movement and exploration.
This is our improved bot from last round
@amkilar

amkilar commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Hi guys, is that the final version of your bot for today?

@HannahSophie08

Copy link
Copy Markdown
Collaborator Author

Hi, no sorry that is a pull request I meant to direct to our fork and accidentally chose the main repository. Naja opened the pull request with the final bot: round 3 bot (#101)

@amkilar

amkilar commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Okay 👍🏻

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.

4 participants