New shim module src/shim/hooks/ai_orders.{h,cpp}: one register-transparent entry
stub on StrategySim::ApplyTurnCommandBatch dumps every submitted TurnCommands block
(six gates, 27 list lengths, element bytes) at the point where all of them are
complete in memory; sixteen entry probes, with RunTaskList's stub recording the
pass so every later hit is pass-attributed.
Two workloads on VM145, one End Turn each. The rule-19 control passed with all
seventeen detours installed: both autosaves byte-identical to the published oracle.
What the AI actually emits, and three things no reading had produced:
- a list-23 element on EVERY turn, the first element ever observed in the free
half of the cost table -- and both turns still cost the measured 12;
- the ids in AI commands are client-allocated and travel in the command (design
18, fleet 34; neither exists in the input save);
- pass 0 emits nothing, measured from element counts rather than inferred.
tests/game_ai/test_live_blocks.cpp rebuilds both captured blocks through the public
OrderClient API and asserts the list profile, element values, gate counts and
ModCount total: 44 checks. Kept separate from test_orders.cpp, which stays the
record of what static reading predicted.
Gates: clean_room_check OK, host ctest 55/55, CT111 shim cross-build exit 0.
39 lines
2.5 KiB
CMake
39 lines
2.5 KiB
CMake
# game/ai tests: the task vocabulary, the priority table read off the original, and the ranking.
|
|
add_executable(game_ai_test_tasks test_tasks.cpp)
|
|
target_link_libraries(game_ai_test_tasks PRIVATE sots_game_ai)
|
|
target_include_directories(game_ai_test_tasks PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
|
target_compile_options(game_ai_test_tasks PRIVATE -Wall -Wextra -pedantic)
|
|
add_test(NAME game_ai_tasks COMMAND game_ai_test_tasks)
|
|
|
|
# The AI stepping order and the two-pass model: which AI players run, in what order, and which
|
|
# pass may write commands. Pure data -- the ModCount sequence, computed offline.
|
|
add_executable(game_ai_test_turn_order test_turn_order.cpp)
|
|
target_link_libraries(game_ai_test_turn_order PRIVATE sots_game_ai)
|
|
target_include_directories(game_ai_test_turn_order PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
|
target_compile_options(game_ai_test_turn_order PRIVATE -Wall -Wextra -pedantic)
|
|
add_test(NAME game_ai_turn_order COMMAND game_ai_test_turn_order)
|
|
|
|
# The command block, the order API and the modification counter's arithmetic: what an order costs,
|
|
# which lists cost nothing, and the two reconstructions of the reference turn.
|
|
add_executable(game_ai_test_orders test_orders.cpp)
|
|
target_link_libraries(game_ai_test_orders PRIVATE sots_game_ai)
|
|
target_include_directories(game_ai_test_orders PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
|
target_compile_options(game_ai_test_orders PRIVATE -Wall -Wextra -pedantic)
|
|
add_test(NAME game_ai_orders COMMAND game_ai_test_orders)
|
|
|
|
# The turn's phase list and the two-pass task walk: the dead tail after the submit, the one
|
|
# species-restricted phase, and the first pass writing nothing.
|
|
add_executable(game_ai_test_agent test_agent.cpp)
|
|
target_link_libraries(game_ai_test_agent PRIVATE sots_game_ai)
|
|
target_include_directories(game_ai_test_agent PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
|
target_compile_options(game_ai_test_agent PRIVATE -Wall -Wextra -pedantic)
|
|
add_test(NAME game_ai_agent COMMAND game_ai_test_agent)
|
|
|
|
# The two AI command blocks read out of the RUNNING game (lane L4). Distinct from test_orders.cpp
|
|
# on purpose: that file is what static reading predicted, this one is what the game did, and the
|
|
# agreement between them is only evidence while the two stay independent.
|
|
add_executable(game_ai_test_live_blocks test_live_blocks.cpp)
|
|
target_link_libraries(game_ai_test_live_blocks PRIVATE sots_game_ai)
|
|
target_include_directories(game_ai_test_live_blocks PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
|
target_compile_options(game_ai_test_live_blocks PRIVATE -Wall -Wextra -pedantic)
|
|
add_test(NAME game_ai_live_blocks COMMAND game_ai_test_live_blocks)
|