perf(snake): cache survival rollout state
Build and Push Docker Container / build-and-push (push) Successful in 6m1s
Build and Push Docker Container / build-and-push (push) Successful in 6m1s
- Cache occupancy bitboards for repeated multiplayer rollout positions. - Memoize position evaluations to avoid duplicate flood-fill calculations. - Reuse shared values while ranking simultaneous enemy responses. - Include evaluation hits in Prism rollout telemetry. - Document the optimization and bump Prism to version 1.4.0.
This commit is contained in:
@@ -52,8 +52,8 @@ class TestPrismBattleSnake_GPT_5_6_Sol(unittest.TestCase):
|
||||
snake = PrismBattleSnake_GPT_5_6_Sol()
|
||||
|
||||
self.assertEqual(snake.name, "PrismBattleSnake")
|
||||
self.assertEqual(snake.version, "1.3.0")
|
||||
self.assertEqual(get_snake_version("PrismBattleSnake_GPT_5_6_Sol"), "1.3.0")
|
||||
self.assertEqual(snake.version, "1.4.0")
|
||||
self.assertEqual(get_snake_version("PrismBattleSnake_GPT_5_6_Sol"), "1.4.0")
|
||||
self.assertGreaterEqual(snake._planning_depth, 4)
|
||||
self.assertIsInstance(SnakeBuilder.build("PrismBattleSnake_GPT_5_6_Sol"), PrismBattleSnake_GPT_5_6_Sol)
|
||||
|
||||
@@ -221,6 +221,7 @@ class TestPrismBattleSnake_GPT_5_6_Sol(unittest.TestCase):
|
||||
search.search_selected(mine, enemies, (2, 1), depth=3)
|
||||
|
||||
self.assertGreater(search.cache_hits, hits_before)
|
||||
self.assertGreater(search.evaluation_cache_hits, 0)
|
||||
self.assertGreaterEqual(search.completed_depth, 3)
|
||||
|
||||
def test_bitboard_duel_search_reuses_transpositions(self):
|
||||
|
||||
Reference in New Issue
Block a user