diff --git a/examples/ai_testing/my_games/current_session.txt b/examples/ai_testing/my_games/current_session.txt index 6b53f0452b42a0950997a29b4f7fb5ea9212c6ae..fd9d452c95c6e5e7b875313a547a6b859296b0d5 100644 --- a/examples/ai_testing/my_games/current_session.txt +++ b/examples/ai_testing/my_games/current_session.txt @@ -1 +1 @@ -session_20260109_003644 \ No newline at end of file +session_20260109_012437 \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260108_220737/A/A.md b/examples/ai_testing/my_games/session_20260108_220737/A/A.md deleted file mode 100644 index c3c51c8f063474d36ce6bab42ed5ace2fb8c0d0f..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260108_220737/A/A.md +++ /dev/null @@ -1,33 +0,0 @@ -# AI Agent Log: A - -**Session:** session_20260108_220737 -**Started:** 2026-01-08 22:07:37 -**Model:** gemini-2.0-flash - ---- - - -## Request #1 - šŸŽÆ ACTIVE TURN - -**Time:** 22:07:39 - -### What Happened -• Game 13e4549e-7718-4b81-806a-055c4dbfd52d has started with 2 players! -• Game 13e4549e-7718-4b81-806a-055c4dbfd52d has started with 2 players! -• Turn 0: Player 0's turn begins. -• Turn 0: Player 0's turn begins. - -### Prompt Sent -See: [prompt_1.json](prompts/prompt_1.json) - -### Response Received āœ… - -**Latency:** 2.05s | **Tokens:** 1344 - -**Thinking:** The game is in the setup phase, and I need to place my first settlement. I will choose a node that has access to a variety of resources to maximize my chances of getting a good start. I will choose no... - -**Note to Self:** Remember to place a road after placing the settlement. - -**Says:** "I will place my settlement on node 20." - ---- diff --git a/examples/ai_testing/my_games/session_20260108_220737/A/prompts/prompt_1.json b/examples/ai_testing/my_games/session_20260108_220737/A/prompts/prompt_1.json deleted file mode 100644 index 15c43106fa024200899a3c43df0995701fe8f15e..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260108_220737/A/prompts/prompt_1.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "request_number": 1, - "timestamp": "2026-01-08T22:07:39.994428", - "player_name": "A", - "is_active_turn": true, - "prompt": { - "meta_data": { - "agent_name": "A", - "role": null - }, - "task_context": { - "what_just_happened": "• Game 13e4549e-7718-4b81-806a-055c4dbfd52d has started with 2 players!\n• Game 13e4549e-7718-4b81-806a-055c4dbfd52d has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." - }, - "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"game_id\":\"13e4549e-7718-4b81-806a-055c4dbfd52d\",\"turn_number\":0,\"current_player\":0,\"game_phase\":\"SETUP_FIRST_ROUND\",\"turn_phase\":\"ROLL_DICE\",\"dice_rolled\":null,\"allowed_actions\":[\"PLACE_STARTING_SETTLEMENT\"],\"board_state\":{\"tiles\":[{\"id\":1,\"position\":[0,0],\"axial_coords\":[0,-2],\"type\":\"forest\",\"token\":6,\"has_robber\":false},{\"id\":2,\"position\":[0,1],\"axial_coords\":[1,-2],\"type\":\"mountains\",\"token\":4,\"has_robber\":false},{\"id\":3,\"position\":[0,2],\"axial_coords\":[2,-2],\"type\":\"fields\",\"token\":5,\"has_robber\":false},{\"id\":4,\"position\":[1,0],\"axial_coords\":[-1,-1],\"type\":\"forest\",\"token\":9,\"has_robber\":false},{\"id\":5,\"position\":[1,1],\"axial_coords\":[0,-1],\"type\":\"desert\",\"token\":null,\"has_robber\":true},{\"id\":6,\"position\":[1,2],\"axial_coords\":[1,-1],\"type\":\"mountains\",\"token\":6,\"has_robber\":false},{\"id\":7,\"position\":[1,3],\"axial_coords\":[2,-1],\"type\":\"mountains\",\"token\":11,\"has_robber\":false},{\"id\":8,\"position\":[2,0],\"axial_coords\":[-2,0],\"type\":\"hills\",\"token\":8,\"has_robber\":false},{\"id\":9,\"position\":[2,1],\"axial_coords\":[-1,0],\"type\":\"pasture\",\"token\":10,\"has_robber\":false},{\"id\":10,\"position\":[2,2],\"axial_coords\":[0,0],\"type\":\"hills\",\"token\":3,\"has_robber\":false},{\"id\":11,\"position\":[2,3],\"axial_coords\":[1,0],\"type\":\"fields\",\"token\":10,\"has_robber\":false},{\"id\":12,\"position\":[2,4],\"axial_coords\":[2,0],\"type\":\"forest\",\"token\":5,\"has_robber\":false},{\"id\":13,\"position\":[3,0],\"axial_coords\":[-2,1],\"type\":\"pasture\",\"token\":11,\"has_robber\":false},{\"id\":14,\"position\":[3,1],\"axial_coords\":[-1,1],\"type\":\"pasture\",\"token\":9,\"has_robber\":false},{\"id\":15,\"position\":[3,2],\"axial_coords\":[0,1],\"type\":\"hills\",\"token\":2,\"has_robber\":false},{\"id\":16,\"position\":[3,3],\"axial_coords\":[1,1],\"type\":\"fields\",\"token\":8,\"has_robber\":false},{\"id\":17,\"position\":[4,0],\"axial_coords\":[-2,2],\"type\":\"fields\",\"token\":12,\"has_robber\":false},{\"id\":18,\"position\":[4,1],\"axial_coords\":[-1,2],\"type\":\"pasture\",\"token\":4,\"has_robber\":false},{\"id\":19,\"position\":[4,2],\"axial_coords\":[0,2],\"type\":\"forest\",\"token\":3,\"has_robber\":false}],\"robber_position\":[1,1]},\"players_state\":[{\"player_id\":0,\"name\":\"A\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0},{\"player_id\":1,\"name\":\"B\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0}]}", - "constraints": { - "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] - } - }, - "response_schema": { - "type": "object", - "required": [ - "internal_thinking", - "action" - ], - "properties": { - "internal_thinking": { - "type": "string", - "description": "Private strategy. What's your plan and why?", - "minLength": 50 - }, - "note_to_self": { - "type": "string", - "description": "Important facts for when it's your turn. Use only if essential for clarity or direct user query. Omit otherwise.", - "maxLength": 100 - }, - "say_outloud": { - "type": "string", - "description": "A short message to other players (max 100 chars). Use for negotiation, threats, or table talk. Keep in mind you pay for speak outload.", - "maxLength": 100 - }, - "action": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "The action type (must match one from allowed_actions in constraints)" - }, - "parameters": { - "type": "string", - "description": "Action parameters as JSON string. Example: {\"node\": 14} or {} if no parameters needed" - } - }, - "propertyOrdering": [ - "type", - "parameters" - ] - } - }, - "propertyOrdering": [ - "internal_thinking", - "note_to_self", - "say_outloud", - "action" - ] - }, - "what_happened": "• Game 13e4549e-7718-4b81-806a-055c4dbfd52d has started with 2 players!\n• Game 13e4549e-7718-4b81-806a-055c4dbfd52d has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260108_220737/A/prompts/prompt_1.txt b/examples/ai_testing/my_games/session_20260108_220737/A/prompts/prompt_1.txt deleted file mode 100644 index f2463d84a9dcf0533ce84f81bb8a4ce6d7556c14..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260108_220737/A/prompts/prompt_1.txt +++ /dev/null @@ -1,37 +0,0 @@ -=== Prompt #1 for A === -Timestamp: 2026-01-08T22:07:39.995240 -Active Turn: True - ---- What Happened --- -• Game 13e4549e-7718-4b81-806a-055c4dbfd52d has started with 2 players! -• Game 13e4549e-7718-4b81-806a-055c4dbfd52d has started with 2 players! -• Turn 0: Player 0's turn begins. -• Turn 0: Player 0's turn begins. - ---- Prompt Content --- -{ - "meta_data": { - "agent_name": "A", - "role": null - }, - "task_context": { - "what_just_happened": "• Game 13e4549e-7718-4b81-806a-055c4dbfd52d has started with 2 players!\n• Game 13e4549e-7718-4b81-806a-055c4dbfd52d has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." - }, - "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"game_id\":\"13e4549e-7718-4b81-806a-055c4dbfd52d\",\"turn_number\":0,\"current_player\":0,\"game_phase\":\"SETUP_FIRST_ROUND\",\"turn_phase\":\"ROLL_DICE\",\"dice_rolled\":null,\"allowed_actions\":[\"PLACE_STARTING_SETTLEMENT\"],\"board_state\":{\"tiles\":[{\"id\":1,\"position\":[0,0],\"axial_coords\":[0,-2],\"type\":\"forest\",\"token\":6,\"has_robber\":false},{\"id\":2,\"position\":[0,1],\"axial_coords\":[1,-2],\"type\":\"mountains\",\"token\":4,\"has_robber\":false},{\"id\":3,\"position\":[0,2],\"axial_coords\":[2,-2],\"type\":\"fields\",\"token\":5,\"has_robber\":false},{\"id\":4,\"position\":[1,0],\"axial_coords\":[-1,-1],\"type\":\"forest\",\"token\":9,\"has_robber\":false},{\"id\":5,\"position\":[1,1],\"axial_coords\":[0,-1],\"type\":\"desert\",\"token\":null,\"has_robber\":true},{\"id\":6,\"position\":[1,2],\"axial_coords\":[1,-1],\"type\":\"mountains\",\"token\":6,\"has_robber\":false},{\"id\":7,\"position\":[1,3],\"axial_coords\":[2,-1],\"type\":\"mountains\",\"token\":11,\"has_robber\":false},{\"id\":8,\"position\":[2,0],\"axial_coords\":[-2,0],\"type\":\"hills\",\"token\":8,\"has_robber\":false},{\"id\":9,\"position\":[2,1],\"axial_coords\":[-1,0],\"type\":\"pasture\",\"token\":10,\"has_robber\":false},{\"id\":10,\"position\":[2,2],\"axial_coords\":[0,0],\"type\":\"hills\",\"token\":3,\"has_robber\":false},{\"id\":11,\"position\":[2,3],\"axial_coords\":[1,0],\"type\":\"fields\",\"token\":10,\"has_robber\":false},{\"id\":12,\"position\":[2,4],\"axial_coords\":[2,0],\"type\":\"forest\",\"token\":5,\"has_robber\":false},{\"id\":13,\"position\":[3,0],\"axial_coords\":[-2,1],\"type\":\"pasture\",\"token\":11,\"has_robber\":false},{\"id\":14,\"position\":[3,1],\"axial_coords\":[-1,1],\"type\":\"pasture\",\"token\":9,\"has_robber\":false},{\"id\":15,\"position\":[3,2],\"axial_coords\":[0,1],\"type\":\"hills\",\"token\":2,\"has_robber\":false},{\"id\":16,\"position\":[3,3],\"axial_coords\":[1,1],\"type\":\"fields\",\"token\":8,\"has_robber\":false},{\"id\":17,\"position\":[4,0],\"axial_coords\":[-2,2],\"type\":\"fields\",\"token\":12,\"has_robber\":false},{\"id\":18,\"position\":[4,1],\"axial_coords\":[-1,2],\"type\":\"pasture\",\"token\":4,\"has_robber\":false},{\"id\":19,\"position\":[4,2],\"axial_coords\":[0,2],\"type\":\"forest\",\"token\":3,\"has_robber\":false}],\"robber_position\":[1,1]},\"players_state\":[{\"player_id\":0,\"name\":\"A\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0},{\"player_id\":1,\"name\":\"B\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0}]}", - "constraints": { - "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] - } -} diff --git a/examples/ai_testing/my_games/session_20260108_220737/A/responses/response_1.json b/examples/ai_testing/my_games/session_20260108_220737/A/responses/response_1.json deleted file mode 100644 index c9a8b7c4cb1ccb557b3185b7da9d702e4c3124c8..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260108_220737/A/responses/response_1.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "request_number": 1, - "timestamp": "2026-01-08T22:07:42.578656", - "player_name": "A", - "success": true, - "raw_content": "{\n \"internal_thinking\": \"The game is in the setup phase, and I need to place my first settlement. I will choose a node that has access to a variety of resources to maximize my chances of getting a good start. I will choose node 20 as it is adjacent to forest, pasture and fields. This placement will give me initial access to wood, sheep and wheat.\",\n \"action\": {\n \"type\": \"PLACE_STARTING_SETTLEMENT\",\n \"parameters\": \"{\\\"node\\\": 20}\"\n },\n \"note_to_self\": \"Remember to place a road after placing the settlement.\",\n \"say_outloud\": \"I will place my settlement on node 20.\"\n}", - "parsed": { - "internal_thinking": "The game is in the setup phase, and I need to place my first settlement. I will choose a node that has access to a variety of resources to maximize my chances of getting a good start. I will choose node 20 as it is adjacent to forest, pasture and fields. This placement will give me initial access to wood, sheep and wheat.", - "note_to_self": "Remember to place a road after placing the settlement.", - "say_outloud": "I will place my settlement on node 20.", - "action_type": "PLACE_STARTING_SETTLEMENT", - "parameters": { - "node": 20 - } - }, - "model": "gemini-2.0-flash-exp", - "tokens": { - "prompt": 1199, - "completion": 145, - "total": 1344 - }, - "latency_seconds": 2.0501668453216553, - "error": null -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260108_220737/session_metadata.json b/examples/ai_testing/my_games/session_20260108_220737/session_metadata.json deleted file mode 100644 index 0ff62b8c7874a848af573c79c9dcfbadbf288e5d..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260108_220737/session_metadata.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "session_id": "session_20260108_220737", - "start_time": "2026-01-08T22:07:37.937376", - "version": "2.0" -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260108_221328/C/C.md b/examples/ai_testing/my_games/session_20260108_221328/C/C.md deleted file mode 100644 index 3ca0807fc4d17f9c9d16415dfbcf37d79c5c655d..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260108_221328/C/C.md +++ /dev/null @@ -1,31 +0,0 @@ -# AI Agent Log: C - -**Session:** session_20260108_221328 -**Started:** 2026-01-08 22:13:28 -**Model:** gemini-2.0-flash - ---- - - -## Request #1 - šŸŽÆ ACTIVE TURN - -**Time:** 22:13:30 - -### What Happened -• Game 8e33b2b8-c462-4c82-afc3-071e8b6afbee has started with 2 players! -• Game 8e33b2b8-c462-4c82-afc3-071e8b6afbee has started with 2 players! -• Turn 0: Player 0's turn begins. -• Turn 0: Player 0's turn begins. - -### Prompt Sent -See: [prompt_1.json](prompts/prompt_1.json) - -### Response Received āœ… - -**Latency:** 1.89s | **Tokens:** 1309 - -**Thinking:** I need to place my first settlement. I will choose a location that gives me access to a variety of resources. I will prioritize locations with high probability numbers (6 or 8) and try to get access t... - -**Note to Self:** Remember to place a road after the settlement. - ---- diff --git a/examples/ai_testing/my_games/session_20260108_221328/C/prompts/prompt_1.json b/examples/ai_testing/my_games/session_20260108_221328/C/prompts/prompt_1.json deleted file mode 100644 index b4128816e01ba219241770bfac66ebfaed109ffb..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260108_221328/C/prompts/prompt_1.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "request_number": 1, - "timestamp": "2026-01-08T22:13:30.430700", - "player_name": "C", - "is_active_turn": true, - "prompt": { - "meta_data": { - "agent_name": "C", - "role": null - }, - "task_context": { - "what_just_happened": "• Game 8e33b2b8-c462-4c82-afc3-071e8b6afbee has started with 2 players!\n• Game 8e33b2b8-c462-4c82-afc3-071e8b6afbee has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." - }, - "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"game_id\":\"8e33b2b8-c462-4c82-afc3-071e8b6afbee\",\"turn_number\":0,\"current_player\":0,\"game_phase\":\"SETUP_FIRST_ROUND\",\"turn_phase\":\"ROLL_DICE\",\"dice_rolled\":null,\"allowed_actions\":[\"PLACE_STARTING_SETTLEMENT\"],\"board_state\":{\"tiles\":[{\"id\":1,\"position\":[0,0],\"axial_coords\":[0,-2],\"type\":\"pasture\",\"token\":4,\"has_robber\":false},{\"id\":2,\"position\":[0,1],\"axial_coords\":[1,-2],\"type\":\"hills\",\"token\":4,\"has_robber\":false},{\"id\":3,\"position\":[0,2],\"axial_coords\":[2,-2],\"type\":\"hills\",\"token\":3,\"has_robber\":false},{\"id\":4,\"position\":[1,0],\"axial_coords\":[-1,-1],\"type\":\"forest\",\"token\":10,\"has_robber\":false},{\"id\":5,\"position\":[1,1],\"axial_coords\":[0,-1],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":6,\"position\":[1,2],\"axial_coords\":[1,-1],\"type\":\"pasture\",\"token\":12,\"has_robber\":false},{\"id\":7,\"position\":[1,3],\"axial_coords\":[2,-1],\"type\":\"hills\",\"token\":2,\"has_robber\":false},{\"id\":8,\"position\":[2,0],\"axial_coords\":[-2,0],\"type\":\"mountains\",\"token\":11,\"has_robber\":false},{\"id\":9,\"position\":[2,1],\"axial_coords\":[-1,0],\"type\":\"mountains\",\"token\":9,\"has_robber\":false},{\"id\":10,\"position\":[2,2],\"axial_coords\":[0,0],\"type\":\"pasture\",\"token\":8,\"has_robber\":false},{\"id\":11,\"position\":[2,3],\"axial_coords\":[1,0],\"type\":\"fields\",\"token\":6,\"has_robber\":false},{\"id\":12,\"position\":[2,4],\"axial_coords\":[2,0],\"type\":\"forest\",\"token\":6,\"has_robber\":false},{\"id\":13,\"position\":[3,0],\"axial_coords\":[-2,1],\"type\":\"mountains\",\"token\":5,\"has_robber\":false},{\"id\":14,\"position\":[3,1],\"axial_coords\":[-1,1],\"type\":\"forest\",\"token\":11,\"has_robber\":false},{\"id\":15,\"position\":[3,2],\"axial_coords\":[0,1],\"type\":\"forest\",\"token\":8,\"has_robber\":false},{\"id\":16,\"position\":[3,3],\"axial_coords\":[1,1],\"type\":\"desert\",\"token\":null,\"has_robber\":true},{\"id\":17,\"position\":[4,0],\"axial_coords\":[-2,2],\"type\":\"fields\",\"token\":3,\"has_robber\":false},{\"id\":18,\"position\":[4,1],\"axial_coords\":[-1,2],\"type\":\"fields\",\"token\":10,\"has_robber\":false},{\"id\":19,\"position\":[4,2],\"axial_coords\":[0,2],\"type\":\"pasture\",\"token\":5,\"has_robber\":false}],\"robber_position\":[3,3]},\"players_state\":[{\"player_id\":0,\"name\":\"C\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0},{\"player_id\":1,\"name\":\"D\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0}]}", - "constraints": { - "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] - } - }, - "response_schema": { - "type": "object", - "required": [ - "internal_thinking", - "action" - ], - "properties": { - "internal_thinking": { - "type": "string", - "description": "Private strategy. What's your plan and why?", - "minLength": 200 - }, - "note_to_self": { - "type": "string", - "description": "Important facts for when it's your turn. Use only if essential for clarity or direct user query. Omit otherwise.", - "maxLength": 100 - }, - "say_outloud": { - "type": "string", - "description": "A short message to other players (max 100 chars). Use for negotiation, threats, or table talk. Keep in mind you pay for speak outload.", - "maxLength": 100 - }, - "action": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "The action type (must match one from allowed_actions in constraints)" - }, - "parameters": { - "type": "string", - "description": "Action parameters as JSON string. Example: {\"node\": 14} or {} if no parameters needed" - } - }, - "propertyOrdering": [ - "type", - "parameters" - ] - } - }, - "propertyOrdering": [ - "internal_thinking", - "note_to_self", - "say_outloud", - "action" - ] - }, - "what_happened": "• Game 8e33b2b8-c462-4c82-afc3-071e8b6afbee has started with 2 players!\n• Game 8e33b2b8-c462-4c82-afc3-071e8b6afbee has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260108_221328/C/prompts/prompt_1.txt b/examples/ai_testing/my_games/session_20260108_221328/C/prompts/prompt_1.txt deleted file mode 100644 index 8437ec63ebb4f8844454e8925521103c4fbca7c5..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260108_221328/C/prompts/prompt_1.txt +++ /dev/null @@ -1,37 +0,0 @@ -=== Prompt #1 for C === -Timestamp: 2026-01-08T22:13:30.431892 -Active Turn: True - ---- What Happened --- -• Game 8e33b2b8-c462-4c82-afc3-071e8b6afbee has started with 2 players! -• Game 8e33b2b8-c462-4c82-afc3-071e8b6afbee has started with 2 players! -• Turn 0: Player 0's turn begins. -• Turn 0: Player 0's turn begins. - ---- Prompt Content --- -{ - "meta_data": { - "agent_name": "C", - "role": null - }, - "task_context": { - "what_just_happened": "• Game 8e33b2b8-c462-4c82-afc3-071e8b6afbee has started with 2 players!\n• Game 8e33b2b8-c462-4c82-afc3-071e8b6afbee has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." - }, - "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"game_id\":\"8e33b2b8-c462-4c82-afc3-071e8b6afbee\",\"turn_number\":0,\"current_player\":0,\"game_phase\":\"SETUP_FIRST_ROUND\",\"turn_phase\":\"ROLL_DICE\",\"dice_rolled\":null,\"allowed_actions\":[\"PLACE_STARTING_SETTLEMENT\"],\"board_state\":{\"tiles\":[{\"id\":1,\"position\":[0,0],\"axial_coords\":[0,-2],\"type\":\"pasture\",\"token\":4,\"has_robber\":false},{\"id\":2,\"position\":[0,1],\"axial_coords\":[1,-2],\"type\":\"hills\",\"token\":4,\"has_robber\":false},{\"id\":3,\"position\":[0,2],\"axial_coords\":[2,-2],\"type\":\"hills\",\"token\":3,\"has_robber\":false},{\"id\":4,\"position\":[1,0],\"axial_coords\":[-1,-1],\"type\":\"forest\",\"token\":10,\"has_robber\":false},{\"id\":5,\"position\":[1,1],\"axial_coords\":[0,-1],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":6,\"position\":[1,2],\"axial_coords\":[1,-1],\"type\":\"pasture\",\"token\":12,\"has_robber\":false},{\"id\":7,\"position\":[1,3],\"axial_coords\":[2,-1],\"type\":\"hills\",\"token\":2,\"has_robber\":false},{\"id\":8,\"position\":[2,0],\"axial_coords\":[-2,0],\"type\":\"mountains\",\"token\":11,\"has_robber\":false},{\"id\":9,\"position\":[2,1],\"axial_coords\":[-1,0],\"type\":\"mountains\",\"token\":9,\"has_robber\":false},{\"id\":10,\"position\":[2,2],\"axial_coords\":[0,0],\"type\":\"pasture\",\"token\":8,\"has_robber\":false},{\"id\":11,\"position\":[2,3],\"axial_coords\":[1,0],\"type\":\"fields\",\"token\":6,\"has_robber\":false},{\"id\":12,\"position\":[2,4],\"axial_coords\":[2,0],\"type\":\"forest\",\"token\":6,\"has_robber\":false},{\"id\":13,\"position\":[3,0],\"axial_coords\":[-2,1],\"type\":\"mountains\",\"token\":5,\"has_robber\":false},{\"id\":14,\"position\":[3,1],\"axial_coords\":[-1,1],\"type\":\"forest\",\"token\":11,\"has_robber\":false},{\"id\":15,\"position\":[3,2],\"axial_coords\":[0,1],\"type\":\"forest\",\"token\":8,\"has_robber\":false},{\"id\":16,\"position\":[3,3],\"axial_coords\":[1,1],\"type\":\"desert\",\"token\":null,\"has_robber\":true},{\"id\":17,\"position\":[4,0],\"axial_coords\":[-2,2],\"type\":\"fields\",\"token\":3,\"has_robber\":false},{\"id\":18,\"position\":[4,1],\"axial_coords\":[-1,2],\"type\":\"fields\",\"token\":10,\"has_robber\":false},{\"id\":19,\"position\":[4,2],\"axial_coords\":[0,2],\"type\":\"pasture\",\"token\":5,\"has_robber\":false}],\"robber_position\":[3,3]},\"players_state\":[{\"player_id\":0,\"name\":\"C\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0},{\"player_id\":1,\"name\":\"D\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0}]}", - "constraints": { - "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] - } -} diff --git a/examples/ai_testing/my_games/session_20260108_221328/C/responses/response_1.json b/examples/ai_testing/my_games/session_20260108_221328/C/responses/response_1.json deleted file mode 100644 index 49ef750d378030621d6dfbbd9115f9b347580a5f..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260108_221328/C/responses/response_1.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "request_number": 1, - "timestamp": "2026-01-08T22:13:32.906634", - "player_name": "C", - "success": true, - "raw_content": "{\n \"internal_thinking\": \"I need to place my first settlement. I will choose a location that gives me access to a variety of resources. I will prioritize locations with high probability numbers (6 or 8) and try to get access to ore for development cards.\",\n \"action\": {\n \"type\": \"PLACE_STARTING_SETTLEMENT\",\n \"parameters\": \"{\\\"node\\\": 21}\"\n },\n \"note_to_self\": \"Remember to place a road after the settlement.\",\n \"say_outloud\": \"\"\n}", - "parsed": { - "internal_thinking": "I need to place my first settlement. I will choose a location that gives me access to a variety of resources. I will prioritize locations with high probability numbers (6 or 8) and try to get access to ore for development cards.", - "note_to_self": "Remember to place a road after the settlement.", - "say_outloud": "", - "action_type": "PLACE_STARTING_SETTLEMENT", - "parameters": { - "node": 21 - } - }, - "model": "gemini-2.0-flash-exp", - "tokens": { - "prompt": 1199, - "completion": 110, - "total": 1309 - }, - "latency_seconds": 1.887739658355713, - "error": null -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260108_221328/session_metadata.json b/examples/ai_testing/my_games/session_20260108_221328/session_metadata.json deleted file mode 100644 index 4a65de4083bac6af107df4d257e2d15f15ae4c25..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260108_221328/session_metadata.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "session_id": "session_20260108_221328", - "start_time": "2026-01-08T22:13:28.374102", - "version": "2.0" -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260108_221416/A/A.md b/examples/ai_testing/my_games/session_20260108_221416/A/A.md deleted file mode 100644 index 79641ef9ce35d665d9f85591856eaa7a295025d2..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260108_221416/A/A.md +++ /dev/null @@ -1,33 +0,0 @@ -# AI Agent Log: A - -**Session:** session_20260108_221416 -**Started:** 2026-01-08 22:14:16 -**Model:** gemini-2.0-flash - ---- - - -## Request #1 - šŸŽÆ ACTIVE TURN - -**Time:** 22:14:18 - -### What Happened -• Game 3feae058-df26-4222-9f6c-c42d55d2e41d has started with 2 players! -• Game 3feae058-df26-4222-9f6c-c42d55d2e41d has started with 2 players! -• Turn 0: Player 0's turn begins. -• Turn 0: Player 0's turn begins. - -### Prompt Sent -See: [prompt_1.json](prompts/prompt_1.json) - -### Response Received āœ… - -**Latency:** 2.05s | **Tokens:** 1345 - -**Thinking:** The game is in the setup phase, and I need to place my first settlement. I will choose a node that has access to a variety of resources to maximize my chances of getting resources early in the game. L... - -**Note to Self:** Remember to place the road in the next turn. - -**Says:** "I will place my first settlement at node 20." - ---- diff --git a/examples/ai_testing/my_games/session_20260108_221416/A/prompts/prompt_1.txt b/examples/ai_testing/my_games/session_20260108_221416/A/prompts/prompt_1.txt deleted file mode 100644 index 7f5c10b5fb691d896b3eb1131186d11be87d0e1d..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260108_221416/A/prompts/prompt_1.txt +++ /dev/null @@ -1,37 +0,0 @@ -=== Prompt #1 for A === -Timestamp: 2026-01-08T22:14:18.830751 -Active Turn: True - ---- What Happened --- -• Game 3feae058-df26-4222-9f6c-c42d55d2e41d has started with 2 players! -• Game 3feae058-df26-4222-9f6c-c42d55d2e41d has started with 2 players! -• Turn 0: Player 0's turn begins. -• Turn 0: Player 0's turn begins. - ---- Prompt Content --- -{ - "meta_data": { - "agent_name": "A", - "role": null - }, - "task_context": { - "what_just_happened": "• Game 3feae058-df26-4222-9f6c-c42d55d2e41d has started with 2 players!\n• Game 3feae058-df26-4222-9f6c-c42d55d2e41d has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." - }, - "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"game_id\":\"3feae058-df26-4222-9f6c-c42d55d2e41d\",\"turn_number\":0,\"current_player\":0,\"game_phase\":\"SETUP_FIRST_ROUND\",\"turn_phase\":\"ROLL_DICE\",\"dice_rolled\":null,\"allowed_actions\":[\"PLACE_STARTING_SETTLEMENT\"],\"board_state\":{\"tiles\":[{\"id\":1,\"position\":[0,0],\"axial_coords\":[0,-2],\"type\":\"pasture\",\"token\":10,\"has_robber\":false},{\"id\":2,\"position\":[0,1],\"axial_coords\":[1,-2],\"type\":\"pasture\",\"token\":11,\"has_robber\":false},{\"id\":3,\"position\":[0,2],\"axial_coords\":[2,-2],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":4,\"position\":[1,0],\"axial_coords\":[-1,-1],\"type\":\"desert\",\"token\":null,\"has_robber\":true},{\"id\":5,\"position\":[1,1],\"axial_coords\":[0,-1],\"type\":\"forest\",\"token\":2,\"has_robber\":false},{\"id\":6,\"position\":[1,2],\"axial_coords\":[1,-1],\"type\":\"mountains\",\"token\":3,\"has_robber\":false},{\"id\":7,\"position\":[1,3],\"axial_coords\":[2,-1],\"type\":\"fields\",\"token\":5,\"has_robber\":false},{\"id\":8,\"position\":[2,0],\"axial_coords\":[-2,0],\"type\":\"pasture\",\"token\":6,\"has_robber\":false},{\"id\":9,\"position\":[2,1],\"axial_coords\":[-1,0],\"type\":\"pasture\",\"token\":11,\"has_robber\":false},{\"id\":10,\"position\":[2,2],\"axial_coords\":[0,0],\"type\":\"fields\",\"token\":8,\"has_robber\":false},{\"id\":11,\"position\":[2,3],\"axial_coords\":[1,0],\"type\":\"forest\",\"token\":6,\"has_robber\":false},{\"id\":12,\"position\":[2,4],\"axial_coords\":[2,0],\"type\":\"forest\",\"token\":4,\"has_robber\":false},{\"id\":13,\"position\":[3,0],\"axial_coords\":[-2,1],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":14,\"position\":[3,1],\"axial_coords\":[-1,1],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":15,\"position\":[3,2],\"axial_coords\":[0,1],\"type\":\"mountains\",\"token\":5,\"has_robber\":false},{\"id\":16,\"position\":[3,3],\"axial_coords\":[1,1],\"type\":\"hills\",\"token\":8,\"has_robber\":false},{\"id\":17,\"position\":[4,0],\"axial_coords\":[-2,2],\"type\":\"mountains\",\"token\":3,\"has_robber\":false},{\"id\":18,\"position\":[4,1],\"axial_coords\":[-1,2],\"type\":\"forest\",\"token\":12,\"has_robber\":false},{\"id\":19,\"position\":[4,2],\"axial_coords\":[0,2],\"type\":\"hills\",\"token\":4,\"has_robber\":false}],\"robber_position\":[1,0]},\"players_state\":[{\"player_id\":0,\"name\":\"A\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0},{\"player_id\":1,\"name\":\"B\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0}]}", - "constraints": { - "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] - } -} diff --git a/examples/ai_testing/my_games/session_20260108_221416/A/responses/response_1.json b/examples/ai_testing/my_games/session_20260108_221416/A/responses/response_1.json deleted file mode 100644 index e74bd75b2d2041137819bae698d174128d919741..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260108_221416/A/responses/response_1.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "request_number": 1, - "timestamp": "2026-01-08T22:14:21.356769", - "player_name": "A", - "success": true, - "raw_content": "{\n \"internal_thinking\": \"The game is in the setup phase, and I need to place my first settlement. I will choose a node that has access to a variety of resources to maximize my chances of getting resources early in the game. Looking at the board state, node 20 seems like a good option as it is adjacent to Pasture (Sheep), Fields (Wheat), and Hills (Brick).\",\n \"action\": {\n \"type\": \"PLACE_STARTING_SETTLEMENT\",\n \"parameters\": \"{\\\"node\\\": 20}\"\n },\n \"note_to_self\": \"Remember to place the road in the next turn.\",\n \"say_outloud\": \"I will place my first settlement at node 20.\"\n}", - "parsed": { - "internal_thinking": "The game is in the setup phase, and I need to place my first settlement. I will choose a node that has access to a variety of resources to maximize my chances of getting resources early in the game. Looking at the board state, node 20 seems like a good option as it is adjacent to Pasture (Sheep), Fields (Wheat), and Hills (Brick). [Response was too brief]", - "note_to_self": "Remember to place the road in the next turn.", - "say_outloud": "I will place my first settlement at node 20.", - "action_type": "PLACE_STARTING_SETTLEMENT", - "parameters": { - "node": 20 - } - }, - "model": "gemini-2.0-flash-exp", - "tokens": { - "prompt": 1199, - "completion": 146, - "total": 1345 - }, - "latency_seconds": 2.04524564743042, - "error": null -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260108_221416/session_metadata.json b/examples/ai_testing/my_games/session_20260108_221416/session_metadata.json deleted file mode 100644 index f2102a6f04923da1616f433df7128c98eaff2bf6..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260108_221416/session_metadata.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "session_id": "session_20260108_221416", - "start_time": "2026-01-08T22:14:16.761851", - "version": "2.0" -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260108_222919/A/A.md b/examples/ai_testing/my_games/session_20260108_222919/A/A.md deleted file mode 100644 index 2a49b685898be122b3123896541fb981e57f2aee..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260108_222919/A/A.md +++ /dev/null @@ -1,22 +0,0 @@ -# AI Agent Log: A - -**Session:** session_20260108_222919 -**Started:** 2026-01-08 22:29:19 -**Model:** gemini-2.0-flash - ---- - - -## Request #1 - šŸŽÆ ACTIVE TURN - -**Time:** 22:29:21 - -### What Happened -• Game a46aa39c-7765-4f3d-9c7a-fc1675373d56 has started with 2 players! -• Game a46aa39c-7765-4f3d-9c7a-fc1675373d56 has started with 2 players! -• Turn 0: Player 0's turn begins. -• Turn 0: Player 0's turn begins. - -### Prompt Sent -See: [prompt_1.json](prompts/prompt_1.json) - diff --git a/examples/ai_testing/my_games/session_20260108_222919/A/prompts/prompt_1.txt b/examples/ai_testing/my_games/session_20260108_222919/A/prompts/prompt_1.txt deleted file mode 100644 index 2dbc5d1de669998ac8dcee5f97e57c73a134e9ed..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260108_222919/A/prompts/prompt_1.txt +++ /dev/null @@ -1,89 +0,0 @@ -=== Prompt #1 for A === -Timestamp: 2026-01-08T22:29:21.094550 -Active Turn: True - ---- What Happened --- -• Game a46aa39c-7765-4f3d-9c7a-fc1675373d56 has started with 2 players! -• Game a46aa39c-7765-4f3d-9c7a-fc1675373d56 has started with 2 players! -• Turn 0: Player 0's turn begins. -• Turn 0: Player 0's turn begins. - ---- Response Schema --- -{ - "type": "object", - "required": [ - "internal_thinking", - "action" - ], - "properties": { - "internal_thinking": { - "type": "string", - "description": "Private strategy. What's your plan and why?", - "minLength": 1000 - }, - "note_to_self": { - "type": "string", - "description": "Important facts for when it's your turn. Use only if essential for clarity or direct user query. Omit otherwise.", - "maxLength": 100 - }, - "say_outloud": { - "type": "string", - "description": "A short message to other players (max 100 chars). Use for negotiation, threats, or table talk. Keep in mind you pay for speak outload.", - "maxLength": 100 - }, - "action": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "The action type (must match one from allowed_actions in constraints)" - }, - "parameters": { - "type": "string", - "description": "Action parameters as JSON string. Example: {\"node\": 14} or {} if no parameters needed" - } - }, - "propertyOrdering": [ - "type", - "parameters" - ] - } - }, - "propertyOrdering": [ - "internal_thinking", - "note_to_self", - "say_outloud", - "action" - ] -} - ---- Prompt Content --- -{ - "meta_data": { - "agent_name": "A", - "role": null - }, - "task_context": { - "what_just_happened": "• Game a46aa39c-7765-4f3d-9c7a-fc1675373d56 has started with 2 players!\n• Game a46aa39c-7765-4f3d-9c7a-fc1675373d56 has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." - }, - "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"game_id\":\"a46aa39c-7765-4f3d-9c7a-fc1675373d56\",\"turn_number\":0,\"current_player\":0,\"game_phase\":\"SETUP_FIRST_ROUND\",\"turn_phase\":\"ROLL_DICE\",\"dice_rolled\":null,\"allowed_actions\":[\"PLACE_STARTING_SETTLEMENT\"],\"board_state\":{\"tiles\":[{\"id\":1,\"position\":[0,0],\"axial_coords\":[0,-2],\"type\":\"pasture\",\"token\":6,\"has_robber\":false},{\"id\":2,\"position\":[0,1],\"axial_coords\":[1,-2],\"type\":\"forest\",\"token\":8,\"has_robber\":false},{\"id\":3,\"position\":[0,2],\"axial_coords\":[2,-2],\"type\":\"pasture\",\"token\":11,\"has_robber\":false},{\"id\":4,\"position\":[1,0],\"axial_coords\":[-1,-1],\"type\":\"fields\",\"token\":3,\"has_robber\":false},{\"id\":5,\"position\":[1,1],\"axial_coords\":[0,-1],\"type\":\"pasture\",\"token\":10,\"has_robber\":false},{\"id\":6,\"position\":[1,2],\"axial_coords\":[1,-1],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":7,\"position\":[1,3],\"axial_coords\":[2,-1],\"type\":\"mountains\",\"token\":11,\"has_robber\":false},{\"id\":8,\"position\":[2,0],\"axial_coords\":[-2,0],\"type\":\"mountains\",\"token\":4,\"has_robber\":false},{\"id\":9,\"position\":[2,1],\"axial_coords\":[-1,0],\"type\":\"forest\",\"token\":9,\"has_robber\":false},{\"id\":10,\"position\":[2,2],\"axial_coords\":[0,0],\"type\":\"mountains\",\"token\":3,\"has_robber\":false},{\"id\":11,\"position\":[2,3],\"axial_coords\":[1,0],\"type\":\"fields\",\"token\":6,\"has_robber\":false},{\"id\":12,\"position\":[2,4],\"axial_coords\":[2,0],\"type\":\"forest\",\"token\":4,\"has_robber\":false},{\"id\":13,\"position\":[3,0],\"axial_coords\":[-2,1],\"type\":\"fields\",\"token\":2,\"has_robber\":false},{\"id\":14,\"position\":[3,1],\"axial_coords\":[-1,1],\"type\":\"hills\",\"token\":12,\"has_robber\":false},{\"id\":15,\"position\":[3,2],\"axial_coords\":[0,1],\"type\":\"forest\",\"token\":8,\"has_robber\":false},{\"id\":16,\"position\":[3,3],\"axial_coords\":[1,1],\"type\":\"desert\",\"token\":null,\"has_robber\":true},{\"id\":17,\"position\":[4,0],\"axial_coords\":[-2,2],\"type\":\"hills\",\"token\":5,\"has_robber\":false},{\"id\":18,\"position\":[4,1],\"axial_coords\":[-1,2],\"type\":\"pasture\",\"token\":5,\"has_robber\":false},{\"id\":19,\"position\":[4,2],\"axial_coords\":[0,2],\"type\":\"fields\",\"token\":9,\"has_robber\":false}],\"robber_position\":[3,3]},\"players_state\":[{\"player_id\":0,\"name\":\"A\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0},{\"player_id\":1,\"name\":\"B\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0}]}", - "constraints": { - "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] - } -} diff --git a/examples/ai_testing/my_games/session_20260108_222919/B/B.md b/examples/ai_testing/my_games/session_20260108_222919/B/B.md deleted file mode 100644 index 70d4fe44d28b86f352c0d30769352f5f35a535e9..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260108_222919/B/B.md +++ /dev/null @@ -1,26 +0,0 @@ -# AI Agent Log: B - -**Session:** session_20260108_222919 -**Started:** 2026-01-08 22:29:19 -**Model:** gemini-2.0-flash - ---- - - -## Request #1 - šŸŽÆ ACTIVE TURN - -**Time:** 22:32:29 - -### What Happened -• Game a46aa39c-7765-4f3d-9c7a-fc1675373d56 has started with 2 players! -• Game a46aa39c-7765-4f3d-9c7a-fc1675373d56 has started with 2 players! -• Turn 0: Player 0's turn begins. -• Turn 0: Player 0's turn begins. -• Player 0 ended their turn -• Player 0 ended their turn -• Turn 1: Player 1's turn begins. -• Turn 1: Player 1's turn begins. - -### Prompt Sent -See: [prompt_1.json](prompts/prompt_1.json) - diff --git a/examples/ai_testing/my_games/session_20260108_222919/B/prompts/prompt_1.json b/examples/ai_testing/my_games/session_20260108_222919/B/prompts/prompt_1.json deleted file mode 100644 index dc7512acbd29e160796fa74d77df1a9d5c9dbde7..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260108_222919/B/prompts/prompt_1.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "request_number": 1, - "timestamp": "2026-01-08T22:32:29.514216", - "player_name": "B", - "is_active_turn": true, - "prompt": { - "meta_data": { - "agent_name": "B", - "role": null - }, - "task_context": { - "what_just_happened": "• Game a46aa39c-7765-4f3d-9c7a-fc1675373d56 has started with 2 players!\n• Game a46aa39c-7765-4f3d-9c7a-fc1675373d56 has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.\n• Player 0 ended their turn\n• Player 0 ended their turn\n• Turn 1: Player 1's turn begins.\n• Turn 1: Player 1's turn begins.", - "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." - }, - "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"game_id\":\"a46aa39c-7765-4f3d-9c7a-fc1675373d56\",\"turn_number\":1,\"current_player\":1,\"game_phase\":\"SETUP_FIRST_ROUND\",\"turn_phase\":\"ROLL_DICE\",\"dice_rolled\":null,\"allowed_actions\":[\"PLACE_STARTING_SETTLEMENT\"],\"board_state\":{\"tiles\":[{\"id\":1,\"position\":[0,0],\"axial_coords\":[0,-2],\"type\":\"pasture\",\"token\":6,\"has_robber\":false},{\"id\":2,\"position\":[0,1],\"axial_coords\":[1,-2],\"type\":\"forest\",\"token\":8,\"has_robber\":false},{\"id\":3,\"position\":[0,2],\"axial_coords\":[2,-2],\"type\":\"pasture\",\"token\":11,\"has_robber\":false},{\"id\":4,\"position\":[1,0],\"axial_coords\":[-1,-1],\"type\":\"fields\",\"token\":3,\"has_robber\":false},{\"id\":5,\"position\":[1,1],\"axial_coords\":[0,-1],\"type\":\"pasture\",\"token\":10,\"has_robber\":false},{\"id\":6,\"position\":[1,2],\"axial_coords\":[1,-1],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":7,\"position\":[1,3],\"axial_coords\":[2,-1],\"type\":\"mountains\",\"token\":11,\"has_robber\":false},{\"id\":8,\"position\":[2,0],\"axial_coords\":[-2,0],\"type\":\"mountains\",\"token\":4,\"has_robber\":false},{\"id\":9,\"position\":[2,1],\"axial_coords\":[-1,0],\"type\":\"forest\",\"token\":9,\"has_robber\":false},{\"id\":10,\"position\":[2,2],\"axial_coords\":[0,0],\"type\":\"mountains\",\"token\":3,\"has_robber\":false},{\"id\":11,\"position\":[2,3],\"axial_coords\":[1,0],\"type\":\"fields\",\"token\":6,\"has_robber\":false},{\"id\":12,\"position\":[2,4],\"axial_coords\":[2,0],\"type\":\"forest\",\"token\":4,\"has_robber\":false},{\"id\":13,\"position\":[3,0],\"axial_coords\":[-2,1],\"type\":\"fields\",\"token\":2,\"has_robber\":false},{\"id\":14,\"position\":[3,1],\"axial_coords\":[-1,1],\"type\":\"hills\",\"token\":12,\"has_robber\":false},{\"id\":15,\"position\":[3,2],\"axial_coords\":[0,1],\"type\":\"forest\",\"token\":8,\"has_robber\":false},{\"id\":16,\"position\":[3,3],\"axial_coords\":[1,1],\"type\":\"desert\",\"token\":null,\"has_robber\":true},{\"id\":17,\"position\":[4,0],\"axial_coords\":[-2,2],\"type\":\"hills\",\"token\":5,\"has_robber\":false},{\"id\":18,\"position\":[4,1],\"axial_coords\":[-1,2],\"type\":\"pasture\",\"token\":5,\"has_robber\":false},{\"id\":19,\"position\":[4,2],\"axial_coords\":[0,2],\"type\":\"fields\",\"token\":9,\"has_robber\":false}],\"robber_position\":[3,3]},\"players_state\":[{\"player_id\":0,\"name\":\"A\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0},{\"player_id\":1,\"name\":\"B\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0}]}", - "constraints": { - "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] - } - }, - "response_schema": { - "type": "object", - "required": [ - "internal_thinking", - "action" - ], - "properties": { - "internal_thinking": { - "type": "string", - "description": "Private strategy. What's your plan and why?", - "minLength": 1000 - }, - "note_to_self": { - "type": "string", - "description": "Important facts for when it's your turn. Use only if essential for clarity or direct user query. Omit otherwise.", - "maxLength": 100 - }, - "say_outloud": { - "type": "string", - "description": "A short message to other players (max 100 chars). Use for negotiation, threats, or table talk. Keep in mind you pay for speak outload.", - "maxLength": 100 - }, - "action": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "The action type (must match one from allowed_actions in constraints)" - }, - "parameters": { - "type": "string", - "description": "Action parameters as JSON string. Example: {\"node\": 14} or {} if no parameters needed" - } - }, - "propertyOrdering": [ - "type", - "parameters" - ] - } - }, - "propertyOrdering": [ - "internal_thinking", - "note_to_self", - "say_outloud", - "action" - ] - }, - "what_happened": "• Game a46aa39c-7765-4f3d-9c7a-fc1675373d56 has started with 2 players!\n• Game a46aa39c-7765-4f3d-9c7a-fc1675373d56 has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.\n• Player 0 ended their turn\n• Player 0 ended their turn\n• Turn 1: Player 1's turn begins.\n• Turn 1: Player 1's turn begins.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260108_222919/B/prompts/prompt_1.txt b/examples/ai_testing/my_games/session_20260108_222919/B/prompts/prompt_1.txt deleted file mode 100644 index 4f8660e0880cbfb0c9d91a8debd26ff6be4daaec..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260108_222919/B/prompts/prompt_1.txt +++ /dev/null @@ -1,93 +0,0 @@ -=== Prompt #1 for B === -Timestamp: 2026-01-08T22:32:29.516254 -Active Turn: True - ---- What Happened --- -• Game a46aa39c-7765-4f3d-9c7a-fc1675373d56 has started with 2 players! -• Game a46aa39c-7765-4f3d-9c7a-fc1675373d56 has started with 2 players! -• Turn 0: Player 0's turn begins. -• Turn 0: Player 0's turn begins. -• Player 0 ended their turn -• Player 0 ended their turn -• Turn 1: Player 1's turn begins. -• Turn 1: Player 1's turn begins. - ---- Response Schema --- -{ - "type": "object", - "required": [ - "internal_thinking", - "action" - ], - "properties": { - "internal_thinking": { - "type": "string", - "description": "Private strategy. What's your plan and why?", - "minLength": 1000 - }, - "note_to_self": { - "type": "string", - "description": "Important facts for when it's your turn. Use only if essential for clarity or direct user query. Omit otherwise.", - "maxLength": 100 - }, - "say_outloud": { - "type": "string", - "description": "A short message to other players (max 100 chars). Use for negotiation, threats, or table talk. Keep in mind you pay for speak outload.", - "maxLength": 100 - }, - "action": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "The action type (must match one from allowed_actions in constraints)" - }, - "parameters": { - "type": "string", - "description": "Action parameters as JSON string. Example: {\"node\": 14} or {} if no parameters needed" - } - }, - "propertyOrdering": [ - "type", - "parameters" - ] - } - }, - "propertyOrdering": [ - "internal_thinking", - "note_to_self", - "say_outloud", - "action" - ] -} - ---- Prompt Content --- -{ - "meta_data": { - "agent_name": "B", - "role": null - }, - "task_context": { - "what_just_happened": "• Game a46aa39c-7765-4f3d-9c7a-fc1675373d56 has started with 2 players!\n• Game a46aa39c-7765-4f3d-9c7a-fc1675373d56 has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.\n• Player 0 ended their turn\n• Player 0 ended their turn\n• Turn 1: Player 1's turn begins.\n• Turn 1: Player 1's turn begins.", - "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." - }, - "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"game_id\":\"a46aa39c-7765-4f3d-9c7a-fc1675373d56\",\"turn_number\":1,\"current_player\":1,\"game_phase\":\"SETUP_FIRST_ROUND\",\"turn_phase\":\"ROLL_DICE\",\"dice_rolled\":null,\"allowed_actions\":[\"PLACE_STARTING_SETTLEMENT\"],\"board_state\":{\"tiles\":[{\"id\":1,\"position\":[0,0],\"axial_coords\":[0,-2],\"type\":\"pasture\",\"token\":6,\"has_robber\":false},{\"id\":2,\"position\":[0,1],\"axial_coords\":[1,-2],\"type\":\"forest\",\"token\":8,\"has_robber\":false},{\"id\":3,\"position\":[0,2],\"axial_coords\":[2,-2],\"type\":\"pasture\",\"token\":11,\"has_robber\":false},{\"id\":4,\"position\":[1,0],\"axial_coords\":[-1,-1],\"type\":\"fields\",\"token\":3,\"has_robber\":false},{\"id\":5,\"position\":[1,1],\"axial_coords\":[0,-1],\"type\":\"pasture\",\"token\":10,\"has_robber\":false},{\"id\":6,\"position\":[1,2],\"axial_coords\":[1,-1],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":7,\"position\":[1,3],\"axial_coords\":[2,-1],\"type\":\"mountains\",\"token\":11,\"has_robber\":false},{\"id\":8,\"position\":[2,0],\"axial_coords\":[-2,0],\"type\":\"mountains\",\"token\":4,\"has_robber\":false},{\"id\":9,\"position\":[2,1],\"axial_coords\":[-1,0],\"type\":\"forest\",\"token\":9,\"has_robber\":false},{\"id\":10,\"position\":[2,2],\"axial_coords\":[0,0],\"type\":\"mountains\",\"token\":3,\"has_robber\":false},{\"id\":11,\"position\":[2,3],\"axial_coords\":[1,0],\"type\":\"fields\",\"token\":6,\"has_robber\":false},{\"id\":12,\"position\":[2,4],\"axial_coords\":[2,0],\"type\":\"forest\",\"token\":4,\"has_robber\":false},{\"id\":13,\"position\":[3,0],\"axial_coords\":[-2,1],\"type\":\"fields\",\"token\":2,\"has_robber\":false},{\"id\":14,\"position\":[3,1],\"axial_coords\":[-1,1],\"type\":\"hills\",\"token\":12,\"has_robber\":false},{\"id\":15,\"position\":[3,2],\"axial_coords\":[0,1],\"type\":\"forest\",\"token\":8,\"has_robber\":false},{\"id\":16,\"position\":[3,3],\"axial_coords\":[1,1],\"type\":\"desert\",\"token\":null,\"has_robber\":true},{\"id\":17,\"position\":[4,0],\"axial_coords\":[-2,2],\"type\":\"hills\",\"token\":5,\"has_robber\":false},{\"id\":18,\"position\":[4,1],\"axial_coords\":[-1,2],\"type\":\"pasture\",\"token\":5,\"has_robber\":false},{\"id\":19,\"position\":[4,2],\"axial_coords\":[0,2],\"type\":\"fields\",\"token\":9,\"has_robber\":false}],\"robber_position\":[3,3]},\"players_state\":[{\"player_id\":0,\"name\":\"A\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0},{\"player_id\":1,\"name\":\"B\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0}]}", - "constraints": { - "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] - } -} diff --git a/examples/ai_testing/my_games/session_20260108_222919/session_metadata.json b/examples/ai_testing/my_games/session_20260108_222919/session_metadata.json deleted file mode 100644 index eee72f1b974504dc6f7e489a9ab28c5adc761e53..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260108_222919/session_metadata.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "session_id": "session_20260108_222919", - "start_time": "2026-01-08T22:29:19.019276", - "version": "2.0" -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260108_223312/A/A.md b/examples/ai_testing/my_games/session_20260108_223312/A/A.md deleted file mode 100644 index 2618df3dc41c4e65f11ff765fd91340e873a57c6..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260108_223312/A/A.md +++ /dev/null @@ -1,22 +0,0 @@ -# AI Agent Log: A - -**Session:** session_20260108_223312 -**Started:** 2026-01-08 22:33:12 -**Model:** gemini-2.0-flash - ---- - - -## Request #1 - šŸŽÆ ACTIVE TURN - -**Time:** 22:33:14 - -### What Happened -• Game baa065b9-f08e-4c5b-a052-e7b82aee3348 has started with 2 players! -• Game baa065b9-f08e-4c5b-a052-e7b82aee3348 has started with 2 players! -• Turn 0: Player 0's turn begins. -• Turn 0: Player 0's turn begins. - -### Prompt Sent -See: [prompt_1.json](prompts/prompt_1.json) - diff --git a/examples/ai_testing/my_games/session_20260108_223312/A/prompts/prompt_1.txt b/examples/ai_testing/my_games/session_20260108_223312/A/prompts/prompt_1.txt deleted file mode 100644 index 8005ec86da92b21b1c01a9b8b73647e96e6f3479..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260108_223312/A/prompts/prompt_1.txt +++ /dev/null @@ -1,89 +0,0 @@ -=== Prompt #1 for A === -Timestamp: 2026-01-08T22:33:14.326800 -Active Turn: True - ---- What Happened --- -• Game baa065b9-f08e-4c5b-a052-e7b82aee3348 has started with 2 players! -• Game baa065b9-f08e-4c5b-a052-e7b82aee3348 has started with 2 players! -• Turn 0: Player 0's turn begins. -• Turn 0: Player 0's turn begins. - ---- Response Schema --- -{ - "type": "object", - "required": [ - "internal_thinking", - "action" - ], - "properties": { - "internal_thinking": { - "type": "string", - "description": "Private strategy. What's your plan and why?", - "minLength": 1000 - }, - "note_to_self": { - "type": "string", - "description": "Important facts for when it's your turn. Use only if essential for clarity or direct user query. Omit otherwise.", - "maxLength": 100 - }, - "say_outloud": { - "type": "string", - "description": "A short message to other players (max 100 chars). Use for negotiation, threats, or table talk. Keep in mind you pay for speak outload.", - "maxLength": 100 - }, - "action": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "The action type (must match one from allowed_actions in constraints)" - }, - "parameters": { - "type": "string", - "description": "Action parameters as JSON string. Example: {\"node\": 14} or {} if no parameters needed" - } - }, - "propertyOrdering": [ - "type", - "parameters" - ] - } - }, - "propertyOrdering": [ - "internal_thinking", - "note_to_self", - "say_outloud", - "action" - ] -} - ---- Prompt Content --- -{ - "meta_data": { - "agent_name": "A", - "role": null - }, - "task_context": { - "what_just_happened": "• Game baa065b9-f08e-4c5b-a052-e7b82aee3348 has started with 2 players!\n• Game baa065b9-f08e-4c5b-a052-e7b82aee3348 has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." - }, - "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"game_id\":\"baa065b9-f08e-4c5b-a052-e7b82aee3348\",\"turn_number\":0,\"current_player\":0,\"game_phase\":\"SETUP_FIRST_ROUND\",\"turn_phase\":\"ROLL_DICE\",\"dice_rolled\":null,\"allowed_actions\":[\"PLACE_STARTING_SETTLEMENT\"],\"board_state\":{\"tiles\":[{\"id\":1,\"position\":[0,0],\"axial_coords\":[0,-2],\"type\":\"mountains\",\"token\":10,\"has_robber\":false},{\"id\":2,\"position\":[0,1],\"axial_coords\":[1,-2],\"type\":\"forest\",\"token\":11,\"has_robber\":false},{\"id\":3,\"position\":[0,2],\"axial_coords\":[2,-2],\"type\":\"pasture\",\"token\":10,\"has_robber\":false},{\"id\":4,\"position\":[1,0],\"axial_coords\":[-1,-1],\"type\":\"pasture\",\"token\":12,\"has_robber\":false},{\"id\":5,\"position\":[1,1],\"axial_coords\":[0,-1],\"type\":\"desert\",\"token\":null,\"has_robber\":true},{\"id\":6,\"position\":[1,2],\"axial_coords\":[1,-1],\"type\":\"forest\",\"token\":5,\"has_robber\":false},{\"id\":7,\"position\":[1,3],\"axial_coords\":[2,-1],\"type\":\"fields\",\"token\":4,\"has_robber\":false},{\"id\":8,\"position\":[2,0],\"axial_coords\":[-2,0],\"type\":\"forest\",\"token\":9,\"has_robber\":false},{\"id\":9,\"position\":[2,1],\"axial_coords\":[-1,0],\"type\":\"fields\",\"token\":5,\"has_robber\":false},{\"id\":10,\"position\":[2,2],\"axial_coords\":[0,0],\"type\":\"forest\",\"token\":6,\"has_robber\":false},{\"id\":11,\"position\":[2,3],\"axial_coords\":[1,0],\"type\":\"pasture\",\"token\":9,\"has_robber\":false},{\"id\":12,\"position\":[2,4],\"axial_coords\":[2,0],\"type\":\"mountains\",\"token\":3,\"has_robber\":false},{\"id\":13,\"position\":[3,0],\"axial_coords\":[-2,1],\"type\":\"hills\",\"token\":6,\"has_robber\":false},{\"id\":14,\"position\":[3,1],\"axial_coords\":[-1,1],\"type\":\"hills\",\"token\":8,\"has_robber\":false},{\"id\":15,\"position\":[3,2],\"axial_coords\":[0,1],\"type\":\"fields\",\"token\":3,\"has_robber\":false},{\"id\":16,\"position\":[3,3],\"axial_coords\":[1,1],\"type\":\"fields\",\"token\":4,\"has_robber\":false},{\"id\":17,\"position\":[4,0],\"axial_coords\":[-2,2],\"type\":\"hills\",\"token\":11,\"has_robber\":false},{\"id\":18,\"position\":[4,1],\"axial_coords\":[-1,2],\"type\":\"mountains\",\"token\":8,\"has_robber\":false},{\"id\":19,\"position\":[4,2],\"axial_coords\":[0,2],\"type\":\"pasture\",\"token\":2,\"has_robber\":false}],\"robber_position\":[1,1]},\"players_state\":[{\"player_id\":0,\"name\":\"A\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0},{\"player_id\":1,\"name\":\"B\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0}]}", - "constraints": { - "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] - } -} diff --git a/examples/ai_testing/my_games/session_20260108_223312/session_metadata.json b/examples/ai_testing/my_games/session_20260108_223312/session_metadata.json deleted file mode 100644 index 46f4d63851e1c49a666866b8ad3990e32bc12b90..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260108_223312/session_metadata.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "session_id": "session_20260108_223312", - "start_time": "2026-01-08T22:33:12.255567", - "version": "2.0" -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260108_223627/A/A.md b/examples/ai_testing/my_games/session_20260108_223627/A/A.md deleted file mode 100644 index 1d93bbdbe158471765fec776442407b81c0b89df..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260108_223627/A/A.md +++ /dev/null @@ -1,33 +0,0 @@ -# AI Agent Log: A - -**Session:** session_20260108_223627 -**Started:** 2026-01-08 22:36:27 -**Model:** gemini-2.0-flash - ---- - - -## Request #1 - šŸŽÆ ACTIVE TURN - -**Time:** 22:36:29 - -### What Happened -• Game 4f333137-6e86-40ca-99ff-cdc2141d7caa has started with 2 players! -• Game 4f333137-6e86-40ca-99ff-cdc2141d7caa has started with 2 players! -• Turn 0: Player 0's turn begins. -• Turn 0: Player 0's turn begins. - -### Prompt Sent -See: [prompt_1.json](prompts/prompt_1.json) - -### Response Received āœ… - -**Latency:** 2.42s | **Tokens:** 1976 - -**Thinking:** I need to place my first settlement. I should choose a location that gives me access to a variety of resources and good probabilities. Looking at the board state, I will choose node 20 as it has acces... - -**Note to Self:** Remember to place the second settlement strategically to maximize resource diversity and probabilities. - -**Says:** "I place my first settlement." - ---- diff --git a/examples/ai_testing/my_games/session_20260108_223627/A/prompts/prompt_1.txt b/examples/ai_testing/my_games/session_20260108_223627/A/prompts/prompt_1.txt deleted file mode 100644 index a6b73b8467993d3c7daa6b93290bacb8180feab4..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260108_223627/A/prompts/prompt_1.txt +++ /dev/null @@ -1,89 +0,0 @@ -=== Prompt #1 for A === -Timestamp: 2026-01-08T22:36:29.984040 -Active Turn: True - ---- What Happened --- -• Game 4f333137-6e86-40ca-99ff-cdc2141d7caa has started with 2 players! -• Game 4f333137-6e86-40ca-99ff-cdc2141d7caa has started with 2 players! -• Turn 0: Player 0's turn begins. -• Turn 0: Player 0's turn begins. - ---- Response Schema --- -{ - "type": "object", - "required": [ - "internal_thinking", - "action" - ], - "properties": { - "internal_thinking": { - "type": "string", - "description": "Private strategy. What's your plan and why?", - "minLength": 1000 - }, - "note_to_self": { - "type": "string", - "description": "Important facts for when it's your turn. Use only if essential for clarity or direct user query. Omit otherwise.", - "maxLength": 100 - }, - "say_outloud": { - "type": "string", - "description": "A short message to other players (max 100 chars). Use for negotiation, threats, or table talk. Keep in mind you pay for speak outload.", - "maxLength": 100 - }, - "action": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "The action type (must match one from allowed_actions in constraints)" - }, - "parameters": { - "type": "string", - "description": "Action parameters as JSON string. Example: {\"node\": 14} or {} if no parameters needed" - } - }, - "propertyOrdering": [ - "type", - "parameters" - ] - } - }, - "propertyOrdering": [ - "internal_thinking", - "note_to_self", - "say_outloud", - "action" - ] -} - ---- Prompt Content --- -{ - "meta_data": { - "agent_name": "A", - "role": null - }, - "task_context": { - "what_just_happened": "• Game 4f333137-6e86-40ca-99ff-cdc2141d7caa has started with 2 players!\n• Game 4f333137-6e86-40ca-99ff-cdc2141d7caa has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." - }, - "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"game_id\":\"4f333137-6e86-40ca-99ff-cdc2141d7caa\",\"turn_number\":0,\"current_player\":0,\"game_phase\":\"SETUP_FIRST_ROUND\",\"turn_phase\":\"ROLL_DICE\",\"dice_rolled\":null,\"allowed_actions\":[\"PLACE_STARTING_SETTLEMENT\"],\"board_state\":{\"tiles\":[{\"id\":1,\"position\":[0,0],\"axial_coords\":[0,-2],\"type\":\"pasture\",\"token\":4,\"has_robber\":false},{\"id\":2,\"position\":[0,1],\"axial_coords\":[1,-2],\"type\":\"hills\",\"token\":11,\"has_robber\":false},{\"id\":3,\"position\":[0,2],\"axial_coords\":[2,-2],\"type\":\"pasture\",\"token\":10,\"has_robber\":false},{\"id\":4,\"position\":[1,0],\"axial_coords\":[-1,-1],\"type\":\"forest\",\"token\":3,\"has_robber\":false},{\"id\":5,\"position\":[1,1],\"axial_coords\":[0,-1],\"type\":\"hills\",\"token\":12,\"has_robber\":false},{\"id\":6,\"position\":[1,2],\"axial_coords\":[1,-1],\"type\":\"pasture\",\"token\":8,\"has_robber\":false},{\"id\":7,\"position\":[1,3],\"axial_coords\":[2,-1],\"type\":\"fields\",\"token\":6,\"has_robber\":false},{\"id\":8,\"position\":[2,0],\"axial_coords\":[-2,0],\"type\":\"mountains\",\"token\":3,\"has_robber\":false},{\"id\":9,\"position\":[2,1],\"axial_coords\":[-1,0],\"type\":\"forest\",\"token\":2,\"has_robber\":false},{\"id\":10,\"position\":[2,2],\"axial_coords\":[0,0],\"type\":\"fields\",\"token\":11,\"has_robber\":false},{\"id\":11,\"position\":[2,3],\"axial_coords\":[1,0],\"type\":\"hills\",\"token\":5,\"has_robber\":false},{\"id\":12,\"position\":[2,4],\"axial_coords\":[2,0],\"type\":\"forest\",\"token\":4,\"has_robber\":false},{\"id\":13,\"position\":[3,0],\"axial_coords\":[-2,1],\"type\":\"pasture\",\"token\":10,\"has_robber\":false},{\"id\":14,\"position\":[3,1],\"axial_coords\":[-1,1],\"type\":\"forest\",\"token\":5,\"has_robber\":false},{\"id\":15,\"position\":[3,2],\"axial_coords\":[0,1],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":16,\"position\":[3,3],\"axial_coords\":[1,1],\"type\":\"fields\",\"token\":6,\"has_robber\":false},{\"id\":17,\"position\":[4,0],\"axial_coords\":[-2,2],\"type\":\"mountains\",\"token\":9,\"has_robber\":false},{\"id\":18,\"position\":[4,1],\"axial_coords\":[-1,2],\"type\":\"desert\",\"token\":null,\"has_robber\":true},{\"id\":19,\"position\":[4,2],\"axial_coords\":[0,2],\"type\":\"mountains\",\"token\":8,\"has_robber\":false}],\"robber_position\":[4,1]},\"players_state\":[{\"player_id\":0,\"name\":\"A\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0},{\"player_id\":1,\"name\":\"B\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0}]}", - "constraints": { - "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] - } -} diff --git a/examples/ai_testing/my_games/session_20260108_223627/A/responses/response_1.json b/examples/ai_testing/my_games/session_20260108_223627/A/responses/response_1.json deleted file mode 100644 index 19d086414f0a65a3f251aab907150ab3cf6aaf81..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260108_223627/A/responses/response_1.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "request_number": 1, - "timestamp": "2026-01-08T22:36:33.060299", - "player_name": "A", - "success": true, - "raw_content": "{\n \"internal_thinking\": \"I need to place my first settlement. I should choose a location that gives me access to a variety of resources and good probabilities. Looking at the board state, I will choose node 20 as it has access to forest (2), field (10) and pasture (15). These resources have probabilities of 11, 6 and 9 respectively.\",\n \"action\": {\n \"type\": \"PLACE_STARTING_SETTLEMENT\",\n \"parameters\": \"{\\\"node\\\": 20}\"\n },\n \"note_to_self\": \"Remember to place the second settlement strategically to maximize resource diversity and probabilities.\",\n \"say_outloud\": \"I place my first settlement.\"\n}", - "parsed": { - "internal_thinking": "I need to place my first settlement. I should choose a location that gives me access to a variety of resources and good probabilities. Looking at the board state, I will choose node 20 as it has access to forest (2), field (10) and pasture (15). These resources have probabilities of 11, 6 and 9 respectively. [Response was too brief]", - "note_to_self": "Remember to place the second settlement strategically to maximize resource diversity and probabilities.", - "say_outloud": "I place my first settlement.", - "action_type": "PLACE_STARTING_SETTLEMENT", - "parameters": { - "node": 20 - } - }, - "model": "gemini-2.0-flash-exp", - "tokens": { - "prompt": 1814, - "completion": 162, - "total": 1976 - }, - "latency_seconds": 2.420753002166748, - "error": null -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260108_223627/session_metadata.json b/examples/ai_testing/my_games/session_20260108_223627/session_metadata.json deleted file mode 100644 index c7eb3b9d00c95649d0827b9a63beed55dd214c80..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260108_223627/session_metadata.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "session_id": "session_20260108_223627", - "start_time": "2026-01-08T22:36:27.930320", - "version": "2.0" -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260108_224106/A/A.md b/examples/ai_testing/my_games/session_20260108_224106/A/A.md deleted file mode 100644 index 7cd9914a5c8cf6d33f7675a33190e87368795b7d..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260108_224106/A/A.md +++ /dev/null @@ -1,28 +0,0 @@ -# AI Agent Log: A - -**Session:** session_20260108_224106 -**Started:** 2026-01-08 22:41:06 -**Model:** gemini-2.0-flash - ---- - - -## Request #1 - šŸŽÆ ACTIVE TURN - -**Time:** 22:41:08 - -### What Happened -• Game 77699780-4e48-41bf-9965-d3b9044bad48 has started with 2 players! -• Game 77699780-4e48-41bf-9965-d3b9044bad48 has started with 2 players! -• Turn 0: Player 0's turn begins. -• Turn 0: Player 0's turn begins. - -### Prompt Sent -See: [prompt_1.json](prompts/prompt_1.json) - -### Response Failed āŒ - -**Error:** Unknown field for GenerationConfig: thinking_config -**Latency:** 0.00s - ---- diff --git a/examples/ai_testing/my_games/session_20260108_224106/A/prompts/prompt_1.json b/examples/ai_testing/my_games/session_20260108_224106/A/prompts/prompt_1.json deleted file mode 100644 index 3111b88705a300c19762846f3a38ff17bc30ddd8..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260108_224106/A/prompts/prompt_1.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "request_number": 1, - "timestamp": "2026-01-08T22:41:08.425593", - "player_name": "A", - "is_active_turn": true, - "prompt": { - "meta_data": { - "agent_name": "A", - "role": null - }, - "task_context": { - "what_just_happened": "• Game 77699780-4e48-41bf-9965-d3b9044bad48 has started with 2 players!\n• Game 77699780-4e48-41bf-9965-d3b9044bad48 has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." - }, - "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"game_id\":\"77699780-4e48-41bf-9965-d3b9044bad48\",\"turn_number\":0,\"current_player\":0,\"game_phase\":\"SETUP_FIRST_ROUND\",\"turn_phase\":\"ROLL_DICE\",\"dice_rolled\":null,\"allowed_actions\":[\"PLACE_STARTING_SETTLEMENT\"],\"board_state\":{\"tiles\":[{\"id\":1,\"position\":[0,0],\"axial_coords\":[0,-2],\"type\":\"pasture\",\"token\":8,\"has_robber\":false},{\"id\":2,\"position\":[0,1],\"axial_coords\":[1,-2],\"type\":\"pasture\",\"token\":10,\"has_robber\":false},{\"id\":3,\"position\":[0,2],\"axial_coords\":[2,-2],\"type\":\"hills\",\"token\":3,\"has_robber\":false},{\"id\":4,\"position\":[1,0],\"axial_coords\":[-1,-1],\"type\":\"fields\",\"token\":8,\"has_robber\":false},{\"id\":5,\"position\":[1,1],\"axial_coords\":[0,-1],\"type\":\"forest\",\"token\":3,\"has_robber\":false},{\"id\":6,\"position\":[1,2],\"axial_coords\":[1,-1],\"type\":\"desert\",\"token\":null,\"has_robber\":true},{\"id\":7,\"position\":[1,3],\"axial_coords\":[2,-1],\"type\":\"hills\",\"token\":4,\"has_robber\":false},{\"id\":8,\"position\":[2,0],\"axial_coords\":[-2,0],\"type\":\"pasture\",\"token\":5,\"has_robber\":false},{\"id\":9,\"position\":[2,1],\"axial_coords\":[-1,0],\"type\":\"forest\",\"token\":10,\"has_robber\":false},{\"id\":10,\"position\":[2,2],\"axial_coords\":[0,0],\"type\":\"mountains\",\"token\":6,\"has_robber\":false},{\"id\":11,\"position\":[2,3],\"axial_coords\":[1,0],\"type\":\"forest\",\"token\":9,\"has_robber\":false},{\"id\":12,\"position\":[2,4],\"axial_coords\":[2,0],\"type\":\"mountains\",\"token\":11,\"has_robber\":false},{\"id\":13,\"position\":[3,0],\"axial_coords\":[-2,1],\"type\":\"hills\",\"token\":11,\"has_robber\":false},{\"id\":14,\"position\":[3,1],\"axial_coords\":[-1,1],\"type\":\"fields\",\"token\":6,\"has_robber\":false},{\"id\":15,\"position\":[3,2],\"axial_coords\":[0,1],\"type\":\"mountains\",\"token\":9,\"has_robber\":false},{\"id\":16,\"position\":[3,3],\"axial_coords\":[1,1],\"type\":\"fields\",\"token\":5,\"has_robber\":false},{\"id\":17,\"position\":[4,0],\"axial_coords\":[-2,2],\"type\":\"fields\",\"token\":4,\"has_robber\":false},{\"id\":18,\"position\":[4,1],\"axial_coords\":[-1,2],\"type\":\"forest\",\"token\":2,\"has_robber\":false},{\"id\":19,\"position\":[4,2],\"axial_coords\":[0,2],\"type\":\"pasture\",\"token\":12,\"has_robber\":false}],\"robber_position\":[1,2]},\"players_state\":[{\"player_id\":0,\"name\":\"A\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0},{\"player_id\":1,\"name\":\"B\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0}]}", - "constraints": { - "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] - } - }, - "response_schema": { - "type": "object", - "required": [ - "internal_thinking", - "action" - ], - "properties": { - "internal_thinking": { - "type": "string", - "description": "Private strategy. What's your plan and why?", - "minLength": 1000 - }, - "note_to_self": { - "type": "string", - "description": "Important facts for when it's your turn. Use only if essential for clarity or direct user query. Omit otherwise.", - "maxLength": 100 - }, - "say_outloud": { - "type": "string", - "description": "A short message to other players (max 100 chars). Use for negotiation, threats, or table talk. Keep in mind you pay for speak outload.", - "maxLength": 100 - }, - "action": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "The action type (must match one from allowed_actions in constraints)" - }, - "parameters": { - "type": "string", - "description": "Action parameters as JSON string. Example: {\"node\": 14} or {} if no parameters needed" - } - }, - "propertyOrdering": [ - "type", - "parameters" - ] - } - }, - "propertyOrdering": [ - "internal_thinking", - "note_to_self", - "say_outloud", - "action" - ] - }, - "what_happened": "• Game 77699780-4e48-41bf-9965-d3b9044bad48 has started with 2 players!\n• Game 77699780-4e48-41bf-9965-d3b9044bad48 has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260108_224106/A/prompts/prompt_1.txt b/examples/ai_testing/my_games/session_20260108_224106/A/prompts/prompt_1.txt deleted file mode 100644 index 2551745b6ce6b9d56cb67f870210db17995968bf..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260108_224106/A/prompts/prompt_1.txt +++ /dev/null @@ -1,89 +0,0 @@ -=== Prompt #1 for A === -Timestamp: 2026-01-08T22:41:08.426258 -Active Turn: True - ---- What Happened --- -• Game 77699780-4e48-41bf-9965-d3b9044bad48 has started with 2 players! -• Game 77699780-4e48-41bf-9965-d3b9044bad48 has started with 2 players! -• Turn 0: Player 0's turn begins. -• Turn 0: Player 0's turn begins. - ---- Response Schema --- -{ - "type": "object", - "required": [ - "internal_thinking", - "action" - ], - "properties": { - "internal_thinking": { - "type": "string", - "description": "Private strategy. What's your plan and why?", - "minLength": 1000 - }, - "note_to_self": { - "type": "string", - "description": "Important facts for when it's your turn. Use only if essential for clarity or direct user query. Omit otherwise.", - "maxLength": 100 - }, - "say_outloud": { - "type": "string", - "description": "A short message to other players (max 100 chars). Use for negotiation, threats, or table talk. Keep in mind you pay for speak outload.", - "maxLength": 100 - }, - "action": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "The action type (must match one from allowed_actions in constraints)" - }, - "parameters": { - "type": "string", - "description": "Action parameters as JSON string. Example: {\"node\": 14} or {} if no parameters needed" - } - }, - "propertyOrdering": [ - "type", - "parameters" - ] - } - }, - "propertyOrdering": [ - "internal_thinking", - "note_to_self", - "say_outloud", - "action" - ] -} - ---- Prompt Content --- -{ - "meta_data": { - "agent_name": "A", - "role": null - }, - "task_context": { - "what_just_happened": "• Game 77699780-4e48-41bf-9965-d3b9044bad48 has started with 2 players!\n• Game 77699780-4e48-41bf-9965-d3b9044bad48 has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." - }, - "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"game_id\":\"77699780-4e48-41bf-9965-d3b9044bad48\",\"turn_number\":0,\"current_player\":0,\"game_phase\":\"SETUP_FIRST_ROUND\",\"turn_phase\":\"ROLL_DICE\",\"dice_rolled\":null,\"allowed_actions\":[\"PLACE_STARTING_SETTLEMENT\"],\"board_state\":{\"tiles\":[{\"id\":1,\"position\":[0,0],\"axial_coords\":[0,-2],\"type\":\"pasture\",\"token\":8,\"has_robber\":false},{\"id\":2,\"position\":[0,1],\"axial_coords\":[1,-2],\"type\":\"pasture\",\"token\":10,\"has_robber\":false},{\"id\":3,\"position\":[0,2],\"axial_coords\":[2,-2],\"type\":\"hills\",\"token\":3,\"has_robber\":false},{\"id\":4,\"position\":[1,0],\"axial_coords\":[-1,-1],\"type\":\"fields\",\"token\":8,\"has_robber\":false},{\"id\":5,\"position\":[1,1],\"axial_coords\":[0,-1],\"type\":\"forest\",\"token\":3,\"has_robber\":false},{\"id\":6,\"position\":[1,2],\"axial_coords\":[1,-1],\"type\":\"desert\",\"token\":null,\"has_robber\":true},{\"id\":7,\"position\":[1,3],\"axial_coords\":[2,-1],\"type\":\"hills\",\"token\":4,\"has_robber\":false},{\"id\":8,\"position\":[2,0],\"axial_coords\":[-2,0],\"type\":\"pasture\",\"token\":5,\"has_robber\":false},{\"id\":9,\"position\":[2,1],\"axial_coords\":[-1,0],\"type\":\"forest\",\"token\":10,\"has_robber\":false},{\"id\":10,\"position\":[2,2],\"axial_coords\":[0,0],\"type\":\"mountains\",\"token\":6,\"has_robber\":false},{\"id\":11,\"position\":[2,3],\"axial_coords\":[1,0],\"type\":\"forest\",\"token\":9,\"has_robber\":false},{\"id\":12,\"position\":[2,4],\"axial_coords\":[2,0],\"type\":\"mountains\",\"token\":11,\"has_robber\":false},{\"id\":13,\"position\":[3,0],\"axial_coords\":[-2,1],\"type\":\"hills\",\"token\":11,\"has_robber\":false},{\"id\":14,\"position\":[3,1],\"axial_coords\":[-1,1],\"type\":\"fields\",\"token\":6,\"has_robber\":false},{\"id\":15,\"position\":[3,2],\"axial_coords\":[0,1],\"type\":\"mountains\",\"token\":9,\"has_robber\":false},{\"id\":16,\"position\":[3,3],\"axial_coords\":[1,1],\"type\":\"fields\",\"token\":5,\"has_robber\":false},{\"id\":17,\"position\":[4,0],\"axial_coords\":[-2,2],\"type\":\"fields\",\"token\":4,\"has_robber\":false},{\"id\":18,\"position\":[4,1],\"axial_coords\":[-1,2],\"type\":\"forest\",\"token\":2,\"has_robber\":false},{\"id\":19,\"position\":[4,2],\"axial_coords\":[0,2],\"type\":\"pasture\",\"token\":12,\"has_robber\":false}],\"robber_position\":[1,2]},\"players_state\":[{\"player_id\":0,\"name\":\"A\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0},{\"player_id\":1,\"name\":\"B\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0}]}", - "constraints": { - "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] - } -} diff --git a/examples/ai_testing/my_games/session_20260108_224106/A/responses/response_1.json b/examples/ai_testing/my_games/session_20260108_224106/A/responses/response_1.json deleted file mode 100644 index 5c33fe6b4bf25893cf9df47d04a88c184ff256c7..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260108_224106/A/responses/response_1.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "request_number": 1, - "timestamp": "2026-01-08T22:41:09.033520", - "player_name": "A", - "success": false, - "raw_content": null, - "parsed": null, - "model": "gemini-2.0-flash-thinking-exp", - "tokens": { - "prompt": 0, - "completion": 0, - "total": 0 - }, - "latency_seconds": 0.0006978511810302734, - "error": "Unknown field for GenerationConfig: thinking_config" -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260108_224106/session_metadata.json b/examples/ai_testing/my_games/session_20260108_224106/session_metadata.json deleted file mode 100644 index 67e36289366c8ed761a90b5297aa878def562c5d..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260108_224106/session_metadata.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "session_id": "session_20260108_224106", - "start_time": "2026-01-08T22:41:06.372030", - "version": "2.0" -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260108_224242/session_metadata.json b/examples/ai_testing/my_games/session_20260108_224242/session_metadata.json deleted file mode 100644 index c730ce1f477398a6154a3063ee711c06b6995d7f..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260108_224242/session_metadata.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "session_id": "session_20260108_224242", - "start_time": "2026-01-08T22:42:42.616283", - "version": "2.0" -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260108_224242/shon/prompts/prompt_1.json b/examples/ai_testing/my_games/session_20260108_224242/shon/prompts/prompt_1.json deleted file mode 100644 index fd3eabedd316d585e604398aae78db472ae9f74f..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260108_224242/shon/prompts/prompt_1.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "request_number": 1, - "timestamp": "2026-01-08T22:42:44.670209", - "player_name": "shon", - "is_active_turn": true, - "prompt": { - "meta_data": { - "agent_name": "shon", - "role": null - }, - "task_context": { - "what_just_happened": "• Game bef7f89a-adbf-4c0d-8160-0a0622dc18b4 has started with 2 players!\n• Game bef7f89a-adbf-4c0d-8160-0a0622dc18b4 has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." - }, - "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"game_id\":\"bef7f89a-adbf-4c0d-8160-0a0622dc18b4\",\"turn_number\":0,\"current_player\":0,\"game_phase\":\"SETUP_FIRST_ROUND\",\"turn_phase\":\"ROLL_DICE\",\"dice_rolled\":null,\"allowed_actions\":[\"PLACE_STARTING_SETTLEMENT\"],\"board_state\":{\"tiles\":[{\"id\":1,\"position\":[0,0],\"axial_coords\":[0,-2],\"type\":\"forest\",\"token\":10,\"has_robber\":false},{\"id\":2,\"position\":[0,1],\"axial_coords\":[1,-2],\"type\":\"pasture\",\"token\":4,\"has_robber\":false},{\"id\":3,\"position\":[0,2],\"axial_coords\":[2,-2],\"type\":\"hills\",\"token\":9,\"has_robber\":false},{\"id\":4,\"position\":[1,0],\"axial_coords\":[-1,-1],\"type\":\"mountains\",\"token\":11,\"has_robber\":false},{\"id\":5,\"position\":[1,1],\"axial_coords\":[0,-1],\"type\":\"fields\",\"token\":3,\"has_robber\":false},{\"id\":6,\"position\":[1,2],\"axial_coords\":[1,-1],\"type\":\"hills\",\"token\":8,\"has_robber\":false},{\"id\":7,\"position\":[1,3],\"axial_coords\":[2,-1],\"type\":\"fields\",\"token\":4,\"has_robber\":false},{\"id\":8,\"position\":[2,0],\"axial_coords\":[-2,0],\"type\":\"forest\",\"token\":8,\"has_robber\":false},{\"id\":9,\"position\":[2,1],\"axial_coords\":[-1,0],\"type\":\"mountains\",\"token\":12,\"has_robber\":false},{\"id\":10,\"position\":[2,2],\"axial_coords\":[0,0],\"type\":\"fields\",\"token\":6,\"has_robber\":false},{\"id\":11,\"position\":[2,3],\"axial_coords\":[1,0],\"type\":\"pasture\",\"token\":11,\"has_robber\":false},{\"id\":12,\"position\":[2,4],\"axial_coords\":[2,0],\"type\":\"forest\",\"token\":6,\"has_robber\":false},{\"id\":13,\"position\":[3,0],\"axial_coords\":[-2,1],\"type\":\"fields\",\"token\":5,\"has_robber\":false},{\"id\":14,\"position\":[3,1],\"axial_coords\":[-1,1],\"type\":\"forest\",\"token\":2,\"has_robber\":false},{\"id\":15,\"position\":[3,2],\"axial_coords\":[0,1],\"type\":\"pasture\",\"token\":5,\"has_robber\":false},{\"id\":16,\"position\":[3,3],\"axial_coords\":[1,1],\"type\":\"mountains\",\"token\":10,\"has_robber\":false},{\"id\":17,\"position\":[4,0],\"axial_coords\":[-2,2],\"type\":\"desert\",\"token\":null,\"has_robber\":true},{\"id\":18,\"position\":[4,1],\"axial_coords\":[-1,2],\"type\":\"hills\",\"token\":3,\"has_robber\":false},{\"id\":19,\"position\":[4,2],\"axial_coords\":[0,2],\"type\":\"pasture\",\"token\":9,\"has_robber\":false}],\"robber_position\":[4,0]},\"players_state\":[{\"player_id\":0,\"name\":\"shon\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0},{\"player_id\":1,\"name\":\"itay\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0}]}", - "constraints": { - "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] - } - }, - "response_schema": { - "type": "object", - "required": [ - "internal_thinking", - "action" - ], - "properties": { - "internal_thinking": { - "type": "string", - "description": "Private strategy. What's your plan and why?", - "minLength": 1000 - }, - "note_to_self": { - "type": "string", - "description": "Important facts for when it's your turn. Use only if essential for clarity or direct user query. Omit otherwise.", - "maxLength": 100 - }, - "say_outloud": { - "type": "string", - "description": "A short message to other players (max 100 chars). Use for negotiation, threats, or table talk. Keep in mind you pay for speak outload.", - "maxLength": 100 - }, - "action": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "The action type (must match one from allowed_actions in constraints)" - }, - "parameters": { - "type": "string", - "description": "Action parameters as JSON string. Example: {\"node\": 14} or {} if no parameters needed" - } - }, - "propertyOrdering": [ - "type", - "parameters" - ] - } - }, - "propertyOrdering": [ - "internal_thinking", - "note_to_self", - "say_outloud", - "action" - ] - }, - "what_happened": "• Game bef7f89a-adbf-4c0d-8160-0a0622dc18b4 has started with 2 players!\n• Game bef7f89a-adbf-4c0d-8160-0a0622dc18b4 has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260108_224242/shon/prompts/prompt_1.txt b/examples/ai_testing/my_games/session_20260108_224242/shon/prompts/prompt_1.txt deleted file mode 100644 index 1ca2ef43364964e6272dcad74f147d357cf94287..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260108_224242/shon/prompts/prompt_1.txt +++ /dev/null @@ -1,89 +0,0 @@ -=== Prompt #1 for shon === -Timestamp: 2026-01-08T22:42:44.671456 -Active Turn: True - ---- What Happened --- -• Game bef7f89a-adbf-4c0d-8160-0a0622dc18b4 has started with 2 players! -• Game bef7f89a-adbf-4c0d-8160-0a0622dc18b4 has started with 2 players! -• Turn 0: Player 0's turn begins. -• Turn 0: Player 0's turn begins. - ---- Response Schema --- -{ - "type": "object", - "required": [ - "internal_thinking", - "action" - ], - "properties": { - "internal_thinking": { - "type": "string", - "description": "Private strategy. What's your plan and why?", - "minLength": 1000 - }, - "note_to_self": { - "type": "string", - "description": "Important facts for when it's your turn. Use only if essential for clarity or direct user query. Omit otherwise.", - "maxLength": 100 - }, - "say_outloud": { - "type": "string", - "description": "A short message to other players (max 100 chars). Use for negotiation, threats, or table talk. Keep in mind you pay for speak outload.", - "maxLength": 100 - }, - "action": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "The action type (must match one from allowed_actions in constraints)" - }, - "parameters": { - "type": "string", - "description": "Action parameters as JSON string. Example: {\"node\": 14} or {} if no parameters needed" - } - }, - "propertyOrdering": [ - "type", - "parameters" - ] - } - }, - "propertyOrdering": [ - "internal_thinking", - "note_to_self", - "say_outloud", - "action" - ] -} - ---- Prompt Content --- -{ - "meta_data": { - "agent_name": "shon", - "role": null - }, - "task_context": { - "what_just_happened": "• Game bef7f89a-adbf-4c0d-8160-0a0622dc18b4 has started with 2 players!\n• Game bef7f89a-adbf-4c0d-8160-0a0622dc18b4 has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." - }, - "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"game_id\":\"bef7f89a-adbf-4c0d-8160-0a0622dc18b4\",\"turn_number\":0,\"current_player\":0,\"game_phase\":\"SETUP_FIRST_ROUND\",\"turn_phase\":\"ROLL_DICE\",\"dice_rolled\":null,\"allowed_actions\":[\"PLACE_STARTING_SETTLEMENT\"],\"board_state\":{\"tiles\":[{\"id\":1,\"position\":[0,0],\"axial_coords\":[0,-2],\"type\":\"forest\",\"token\":10,\"has_robber\":false},{\"id\":2,\"position\":[0,1],\"axial_coords\":[1,-2],\"type\":\"pasture\",\"token\":4,\"has_robber\":false},{\"id\":3,\"position\":[0,2],\"axial_coords\":[2,-2],\"type\":\"hills\",\"token\":9,\"has_robber\":false},{\"id\":4,\"position\":[1,0],\"axial_coords\":[-1,-1],\"type\":\"mountains\",\"token\":11,\"has_robber\":false},{\"id\":5,\"position\":[1,1],\"axial_coords\":[0,-1],\"type\":\"fields\",\"token\":3,\"has_robber\":false},{\"id\":6,\"position\":[1,2],\"axial_coords\":[1,-1],\"type\":\"hills\",\"token\":8,\"has_robber\":false},{\"id\":7,\"position\":[1,3],\"axial_coords\":[2,-1],\"type\":\"fields\",\"token\":4,\"has_robber\":false},{\"id\":8,\"position\":[2,0],\"axial_coords\":[-2,0],\"type\":\"forest\",\"token\":8,\"has_robber\":false},{\"id\":9,\"position\":[2,1],\"axial_coords\":[-1,0],\"type\":\"mountains\",\"token\":12,\"has_robber\":false},{\"id\":10,\"position\":[2,2],\"axial_coords\":[0,0],\"type\":\"fields\",\"token\":6,\"has_robber\":false},{\"id\":11,\"position\":[2,3],\"axial_coords\":[1,0],\"type\":\"pasture\",\"token\":11,\"has_robber\":false},{\"id\":12,\"position\":[2,4],\"axial_coords\":[2,0],\"type\":\"forest\",\"token\":6,\"has_robber\":false},{\"id\":13,\"position\":[3,0],\"axial_coords\":[-2,1],\"type\":\"fields\",\"token\":5,\"has_robber\":false},{\"id\":14,\"position\":[3,1],\"axial_coords\":[-1,1],\"type\":\"forest\",\"token\":2,\"has_robber\":false},{\"id\":15,\"position\":[3,2],\"axial_coords\":[0,1],\"type\":\"pasture\",\"token\":5,\"has_robber\":false},{\"id\":16,\"position\":[3,3],\"axial_coords\":[1,1],\"type\":\"mountains\",\"token\":10,\"has_robber\":false},{\"id\":17,\"position\":[4,0],\"axial_coords\":[-2,2],\"type\":\"desert\",\"token\":null,\"has_robber\":true},{\"id\":18,\"position\":[4,1],\"axial_coords\":[-1,2],\"type\":\"hills\",\"token\":3,\"has_robber\":false},{\"id\":19,\"position\":[4,2],\"axial_coords\":[0,2],\"type\":\"pasture\",\"token\":9,\"has_robber\":false}],\"robber_position\":[4,0]},\"players_state\":[{\"player_id\":0,\"name\":\"shon\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0},{\"player_id\":1,\"name\":\"itay\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0}]}", - "constraints": { - "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] - } -} diff --git a/examples/ai_testing/my_games/session_20260108_224242/shon/prompts/prompt_2.json b/examples/ai_testing/my_games/session_20260108_224242/shon/prompts/prompt_2.json deleted file mode 100644 index 2c9bc53a96d4f39fb97adb7b0376e400948d681b..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260108_224242/shon/prompts/prompt_2.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "request_number": 2, - "timestamp": "2026-01-08T22:43:32.992251", - "player_name": "shon", - "is_active_turn": true, - "prompt": { - "meta_data": { - "agent_name": "shon", - "role": null - }, - "task_context": { - "what_just_happened": "• Game bef7f89a-adbf-4c0d-8160-0a0622dc18b4 has started with 2 players!\n• Game bef7f89a-adbf-4c0d-8160-0a0622dc18b4 has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." - }, - "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"game_id\":\"bef7f89a-adbf-4c0d-8160-0a0622dc18b4\",\"turn_number\":0,\"current_player\":0,\"game_phase\":\"SETUP_FIRST_ROUND\",\"turn_phase\":\"ROLL_DICE\",\"dice_rolled\":null,\"allowed_actions\":[\"PLACE_STARTING_SETTLEMENT\"],\"board_state\":{\"tiles\":[{\"id\":1,\"position\":[0,0],\"axial_coords\":[0,-2],\"type\":\"forest\",\"token\":10,\"has_robber\":false},{\"id\":2,\"position\":[0,1],\"axial_coords\":[1,-2],\"type\":\"pasture\",\"token\":4,\"has_robber\":false},{\"id\":3,\"position\":[0,2],\"axial_coords\":[2,-2],\"type\":\"hills\",\"token\":9,\"has_robber\":false},{\"id\":4,\"position\":[1,0],\"axial_coords\":[-1,-1],\"type\":\"mountains\",\"token\":11,\"has_robber\":false},{\"id\":5,\"position\":[1,1],\"axial_coords\":[0,-1],\"type\":\"fields\",\"token\":3,\"has_robber\":false},{\"id\":6,\"position\":[1,2],\"axial_coords\":[1,-1],\"type\":\"hills\",\"token\":8,\"has_robber\":false},{\"id\":7,\"position\":[1,3],\"axial_coords\":[2,-1],\"type\":\"fields\",\"token\":4,\"has_robber\":false},{\"id\":8,\"position\":[2,0],\"axial_coords\":[-2,0],\"type\":\"forest\",\"token\":8,\"has_robber\":false},{\"id\":9,\"position\":[2,1],\"axial_coords\":[-1,0],\"type\":\"mountains\",\"token\":12,\"has_robber\":false},{\"id\":10,\"position\":[2,2],\"axial_coords\":[0,0],\"type\":\"fields\",\"token\":6,\"has_robber\":false},{\"id\":11,\"position\":[2,3],\"axial_coords\":[1,0],\"type\":\"pasture\",\"token\":11,\"has_robber\":false},{\"id\":12,\"position\":[2,4],\"axial_coords\":[2,0],\"type\":\"forest\",\"token\":6,\"has_robber\":false},{\"id\":13,\"position\":[3,0],\"axial_coords\":[-2,1],\"type\":\"fields\",\"token\":5,\"has_robber\":false},{\"id\":14,\"position\":[3,1],\"axial_coords\":[-1,1],\"type\":\"forest\",\"token\":2,\"has_robber\":false},{\"id\":15,\"position\":[3,2],\"axial_coords\":[0,1],\"type\":\"pasture\",\"token\":5,\"has_robber\":false},{\"id\":16,\"position\":[3,3],\"axial_coords\":[1,1],\"type\":\"mountains\",\"token\":10,\"has_robber\":false},{\"id\":17,\"position\":[4,0],\"axial_coords\":[-2,2],\"type\":\"desert\",\"token\":null,\"has_robber\":true},{\"id\":18,\"position\":[4,1],\"axial_coords\":[-1,2],\"type\":\"hills\",\"token\":3,\"has_robber\":false},{\"id\":19,\"position\":[4,2],\"axial_coords\":[0,2],\"type\":\"pasture\",\"token\":9,\"has_robber\":false}],\"robber_position\":[4,0]},\"players_state\":[{\"player_id\":0,\"name\":\"shon\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0},{\"player_id\":1,\"name\":\"itay\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0}]}", - "constraints": { - "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] - } - }, - "response_schema": { - "type": "object", - "required": [ - "internal_thinking", - "action" - ], - "properties": { - "internal_thinking": { - "type": "string", - "description": "Private strategy. What's your plan and why?", - "minLength": 1000 - }, - "note_to_self": { - "type": "string", - "description": "Important facts for when it's your turn. Use only if essential for clarity or direct user query. Omit otherwise.", - "maxLength": 100 - }, - "say_outloud": { - "type": "string", - "description": "A short message to other players (max 100 chars). Use for negotiation, threats, or table talk. Keep in mind you pay for speak outload.", - "maxLength": 100 - }, - "action": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "The action type (must match one from allowed_actions in constraints)" - }, - "parameters": { - "type": "string", - "description": "Action parameters as JSON string. Example: {\"node\": 14} or {} if no parameters needed" - } - }, - "propertyOrdering": [ - "type", - "parameters" - ] - } - }, - "propertyOrdering": [ - "internal_thinking", - "note_to_self", - "say_outloud", - "action" - ] - }, - "what_happened": "• Game bef7f89a-adbf-4c0d-8160-0a0622dc18b4 has started with 2 players!\n• Game bef7f89a-adbf-4c0d-8160-0a0622dc18b4 has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260108_224242/shon/prompts/prompt_2.txt b/examples/ai_testing/my_games/session_20260108_224242/shon/prompts/prompt_2.txt deleted file mode 100644 index b7c757d97b043394c1c559b29c528bf8f518a9ed..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260108_224242/shon/prompts/prompt_2.txt +++ /dev/null @@ -1,89 +0,0 @@ -=== Prompt #2 for shon === -Timestamp: 2026-01-08T22:43:32.993722 -Active Turn: True - ---- What Happened --- -• Game bef7f89a-adbf-4c0d-8160-0a0622dc18b4 has started with 2 players! -• Game bef7f89a-adbf-4c0d-8160-0a0622dc18b4 has started with 2 players! -• Turn 0: Player 0's turn begins. -• Turn 0: Player 0's turn begins. - ---- Response Schema --- -{ - "type": "object", - "required": [ - "internal_thinking", - "action" - ], - "properties": { - "internal_thinking": { - "type": "string", - "description": "Private strategy. What's your plan and why?", - "minLength": 1000 - }, - "note_to_self": { - "type": "string", - "description": "Important facts for when it's your turn. Use only if essential for clarity or direct user query. Omit otherwise.", - "maxLength": 100 - }, - "say_outloud": { - "type": "string", - "description": "A short message to other players (max 100 chars). Use for negotiation, threats, or table talk. Keep in mind you pay for speak outload.", - "maxLength": 100 - }, - "action": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "The action type (must match one from allowed_actions in constraints)" - }, - "parameters": { - "type": "string", - "description": "Action parameters as JSON string. Example: {\"node\": 14} or {} if no parameters needed" - } - }, - "propertyOrdering": [ - "type", - "parameters" - ] - } - }, - "propertyOrdering": [ - "internal_thinking", - "note_to_self", - "say_outloud", - "action" - ] -} - ---- Prompt Content --- -{ - "meta_data": { - "agent_name": "shon", - "role": null - }, - "task_context": { - "what_just_happened": "• Game bef7f89a-adbf-4c0d-8160-0a0622dc18b4 has started with 2 players!\n• Game bef7f89a-adbf-4c0d-8160-0a0622dc18b4 has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." - }, - "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"game_id\":\"bef7f89a-adbf-4c0d-8160-0a0622dc18b4\",\"turn_number\":0,\"current_player\":0,\"game_phase\":\"SETUP_FIRST_ROUND\",\"turn_phase\":\"ROLL_DICE\",\"dice_rolled\":null,\"allowed_actions\":[\"PLACE_STARTING_SETTLEMENT\"],\"board_state\":{\"tiles\":[{\"id\":1,\"position\":[0,0],\"axial_coords\":[0,-2],\"type\":\"forest\",\"token\":10,\"has_robber\":false},{\"id\":2,\"position\":[0,1],\"axial_coords\":[1,-2],\"type\":\"pasture\",\"token\":4,\"has_robber\":false},{\"id\":3,\"position\":[0,2],\"axial_coords\":[2,-2],\"type\":\"hills\",\"token\":9,\"has_robber\":false},{\"id\":4,\"position\":[1,0],\"axial_coords\":[-1,-1],\"type\":\"mountains\",\"token\":11,\"has_robber\":false},{\"id\":5,\"position\":[1,1],\"axial_coords\":[0,-1],\"type\":\"fields\",\"token\":3,\"has_robber\":false},{\"id\":6,\"position\":[1,2],\"axial_coords\":[1,-1],\"type\":\"hills\",\"token\":8,\"has_robber\":false},{\"id\":7,\"position\":[1,3],\"axial_coords\":[2,-1],\"type\":\"fields\",\"token\":4,\"has_robber\":false},{\"id\":8,\"position\":[2,0],\"axial_coords\":[-2,0],\"type\":\"forest\",\"token\":8,\"has_robber\":false},{\"id\":9,\"position\":[2,1],\"axial_coords\":[-1,0],\"type\":\"mountains\",\"token\":12,\"has_robber\":false},{\"id\":10,\"position\":[2,2],\"axial_coords\":[0,0],\"type\":\"fields\",\"token\":6,\"has_robber\":false},{\"id\":11,\"position\":[2,3],\"axial_coords\":[1,0],\"type\":\"pasture\",\"token\":11,\"has_robber\":false},{\"id\":12,\"position\":[2,4],\"axial_coords\":[2,0],\"type\":\"forest\",\"token\":6,\"has_robber\":false},{\"id\":13,\"position\":[3,0],\"axial_coords\":[-2,1],\"type\":\"fields\",\"token\":5,\"has_robber\":false},{\"id\":14,\"position\":[3,1],\"axial_coords\":[-1,1],\"type\":\"forest\",\"token\":2,\"has_robber\":false},{\"id\":15,\"position\":[3,2],\"axial_coords\":[0,1],\"type\":\"pasture\",\"token\":5,\"has_robber\":false},{\"id\":16,\"position\":[3,3],\"axial_coords\":[1,1],\"type\":\"mountains\",\"token\":10,\"has_robber\":false},{\"id\":17,\"position\":[4,0],\"axial_coords\":[-2,2],\"type\":\"desert\",\"token\":null,\"has_robber\":true},{\"id\":18,\"position\":[4,1],\"axial_coords\":[-1,2],\"type\":\"hills\",\"token\":3,\"has_robber\":false},{\"id\":19,\"position\":[4,2],\"axial_coords\":[0,2],\"type\":\"pasture\",\"token\":9,\"has_robber\":false}],\"robber_position\":[4,0]},\"players_state\":[{\"player_id\":0,\"name\":\"shon\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0},{\"player_id\":1,\"name\":\"itay\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0}]}", - "constraints": { - "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] - } -} diff --git a/examples/ai_testing/my_games/session_20260108_224242/shon/responses/response_1.json b/examples/ai_testing/my_games/session_20260108_224242/shon/responses/response_1.json deleted file mode 100644 index 9c0bc7dc2e0d69aad179d98dac78fed6a4977e06..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260108_224242/shon/responses/response_1.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "request_number": 1, - "timestamp": "2026-01-08T22:42:47.096322", - "player_name": "shon", - "success": true, - "raw_content": "{\n \"internal_thinking\": \"It is the first turn of the game, and I need to place my first settlement. I will choose a location that gives me access to a variety of resources. Node 20 is connected to hexes 5, 10, and 15 which represent Fields(3), Fields(6), and Pasture(5). These are good starting resources.\",\n \"action\": {\n \"type\": \"PLACE_STARTING_SETTLEMENT\",\n \"parameters\": \"{\\\"node\\\": 20}\"\n },\n \"note_to_self\": \"Remember to place a road after placing the settlement.\",\n \"say_outloud\": \"Placing my first settlement.\"\n}", - "parsed": { - "internal_thinking": "It is the first turn of the game, and I need to place my first settlement. I will choose a location that gives me access to a variety of resources. Node 20 is connected to hexes 5, 10, and 15 which represent Fields(3), Fields(6), and Pasture(5). These are good starting resources. [Response was too brief]", - "note_to_self": "Remember to place a road after placing the settlement.", - "say_outloud": "Placing my first settlement.", - "action_type": "PLACE_STARTING_SETTLEMENT", - "parameters": { - "node": 20 - } - }, - "model": "gemini-2.0-flash-exp", - "tokens": { - "prompt": 1818, - "completion": 158, - "total": 1976 - }, - "latency_seconds": 1.8663063049316406, - "error": null -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260108_224242/shon/responses/response_2.json b/examples/ai_testing/my_games/session_20260108_224242/shon/responses/response_2.json deleted file mode 100644 index 8ebe72de7842316e6b9ae2e0a58a60201011e3a3..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260108_224242/shon/responses/response_2.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "request_number": 2, - "timestamp": "2026-01-08T22:43:34.472659", - "player_name": "shon", - "success": true, - "raw_content": "{\n \"internal_thinking\": \"I need to place my starting settlement. I will choose a node that gives me access to a variety of resources and good dice roll probabilities. I will analyze the board state to find the best location.\",\n \"action\": {\n \"type\": \"place_starting_settlement\",\n \"parameters\": \"{\\\"node\\\": 10}\"\n },\n \"note_to_self\": \"Remember to place a road after placing the settlement.\",\n \"say_outloud\": \"Placing my first settlement.\"\n}", - "parsed": { - "internal_thinking": "I need to place my starting settlement. I will choose a node that gives me access to a variety of resources and good dice roll probabilities. I will analyze the board state to find the best location. [Response was too brief]", - "note_to_self": "Remember to place a road after placing the settlement.", - "say_outloud": "Placing my first settlement.", - "action_type": "place_starting_settlement", - "parameters": { - "node": 10 - } - }, - "model": "gemini-2.0-flash-exp", - "tokens": { - "prompt": 1818, - "completion": 121, - "total": 1939 - }, - "latency_seconds": 1.474149465560913, - "error": null -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260108_224242/shon/shon.md b/examples/ai_testing/my_games/session_20260108_224242/shon/shon.md deleted file mode 100644 index 9046818d21c35cfc5186adcf6c211a5c0dd76289..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260108_224242/shon/shon.md +++ /dev/null @@ -1,58 +0,0 @@ -# AI Agent Log: shon - -**Session:** session_20260108_224242 -**Started:** 2026-01-08 22:42:42 -**Model:** gemini-2.0-flash - ---- - - -## Request #1 - šŸŽÆ ACTIVE TURN - -**Time:** 22:42:44 - -### What Happened -• Game bef7f89a-adbf-4c0d-8160-0a0622dc18b4 has started with 2 players! -• Game bef7f89a-adbf-4c0d-8160-0a0622dc18b4 has started with 2 players! -• Turn 0: Player 0's turn begins. -• Turn 0: Player 0's turn begins. - -### Prompt Sent -See: [prompt_1.json](prompts/prompt_1.json) - -### Response Received āœ… - -**Latency:** 1.87s | **Tokens:** 1976 - -**Thinking:** It is the first turn of the game, and I need to place my first settlement. I will choose a location that gives me access to a variety of resources. Node 20 is connected to hexes 5, 10, and 15 which re... - -**Note to Self:** Remember to place a road after placing the settlement. - -**Says:** "Placing my first settlement." - ---- - -## Request #2 - šŸŽÆ ACTIVE TURN - -**Time:** 22:43:32 - -### What Happened -• Game bef7f89a-adbf-4c0d-8160-0a0622dc18b4 has started with 2 players! -• Game bef7f89a-adbf-4c0d-8160-0a0622dc18b4 has started with 2 players! -• Turn 0: Player 0's turn begins. -• Turn 0: Player 0's turn begins. - -### Prompt Sent -See: [prompt_2.json](prompts/prompt_2.json) - -### Response Received āœ… - -**Latency:** 1.47s | **Tokens:** 1939 - -**Thinking:** I need to place my starting settlement. I will choose a node that gives me access to a variety of resources and good dice roll probabilities. I will analyze the board state to find the best location. ... - -**Note to Self:** Remember to place a road after placing the settlement. - -**Says:** "Placing my first settlement." - ---- diff --git a/examples/ai_testing/my_games/session_20260109_001335/A/A.md b/examples/ai_testing/my_games/session_20260109_001335/A/A.md deleted file mode 100644 index 12036399fcb647b740f1df6785f9da6f8249befb..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_001335/A/A.md +++ /dev/null @@ -1,28 +0,0 @@ -# AI Agent Log: A - -**Session:** session_20260109_001335 -**Started:** 2026-01-09 00:13:35 -**Model:** gemini-2.0-flash - ---- - - -## Request #1 - šŸŽÆ ACTIVE TURN - -**Time:** 00:13:37 - -### What Happened -• Game 644b2993-1279-436d-b7e1-f0fd259a42d9 has started with 2 players! -• Game 644b2993-1279-436d-b7e1-f0fd259a42d9 has started with 2 players! -• Turn 0: Player 0's turn begins. -• Turn 0: Player 0's turn begins. - -### Prompt Sent -See: [prompt_1.json](prompts/prompt_1.json) - -### Response Failed āŒ - -**Error:** 400 INVALID_ARGUMENT. {'error': {'code': 400, 'message': 'Unable to submit request because thinking is not supported by this model. Learn more: https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/gemini', 'status': 'INVALID_ARGUMENT'}} -**Latency:** 0.54s - ---- diff --git a/examples/ai_testing/my_games/session_20260109_001335/A/prompts/prompt_1.json b/examples/ai_testing/my_games/session_20260109_001335/A/prompts/prompt_1.json deleted file mode 100644 index 31775d4be45e7d9732fc53be9caf609ad17c89db..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_001335/A/prompts/prompt_1.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "request_number": 1, - "timestamp": "2026-01-09T00:13:37.229385", - "player_name": "A", - "is_active_turn": true, - "prompt": { - "meta_data": { - "agent_name": "A", - "role": null - }, - "task_context": { - "what_just_happened": "• Game 644b2993-1279-436d-b7e1-f0fd259a42d9 has started with 2 players!\n• Game 644b2993-1279-436d-b7e1-f0fd259a42d9 has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." - }, - "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"game_id\":\"644b2993-1279-436d-b7e1-f0fd259a42d9\",\"turn_number\":0,\"current_player\":0,\"game_phase\":\"SETUP_FIRST_ROUND\",\"turn_phase\":\"ROLL_DICE\",\"dice_rolled\":null,\"allowed_actions\":[\"PLACE_STARTING_SETTLEMENT\"],\"board_state\":{\"tiles\":[{\"id\":1,\"position\":[0,0],\"axial_coords\":[0,-2],\"type\":\"forest\",\"token\":12,\"has_robber\":false},{\"id\":2,\"position\":[0,1],\"axial_coords\":[1,-2],\"type\":\"pasture\",\"token\":5,\"has_robber\":false},{\"id\":3,\"position\":[0,2],\"axial_coords\":[2,-2],\"type\":\"forest\",\"token\":4,\"has_robber\":false},{\"id\":4,\"position\":[1,0],\"axial_coords\":[-1,-1],\"type\":\"pasture\",\"token\":8,\"has_robber\":false},{\"id\":5,\"position\":[1,1],\"axial_coords\":[0,-1],\"type\":\"hills\",\"token\":6,\"has_robber\":false},{\"id\":6,\"position\":[1,2],\"axial_coords\":[1,-1],\"type\":\"forest\",\"token\":3,\"has_robber\":false},{\"id\":7,\"position\":[1,3],\"axial_coords\":[2,-1],\"type\":\"fields\",\"token\":8,\"has_robber\":false},{\"id\":8,\"position\":[2,0],\"axial_coords\":[-2,0],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":9,\"position\":[2,1],\"axial_coords\":[-1,0],\"type\":\"forest\",\"token\":11,\"has_robber\":false},{\"id\":10,\"position\":[2,2],\"axial_coords\":[0,0],\"type\":\"desert\",\"token\":null,\"has_robber\":true},{\"id\":11,\"position\":[2,3],\"axial_coords\":[1,0],\"type\":\"mountains\",\"token\":3,\"has_robber\":false},{\"id\":12,\"position\":[2,4],\"axial_coords\":[2,0],\"type\":\"pasture\",\"token\":4,\"has_robber\":false},{\"id\":13,\"position\":[3,0],\"axial_coords\":[-2,1],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":14,\"position\":[3,1],\"axial_coords\":[-1,1],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":15,\"position\":[3,2],\"axial_coords\":[0,1],\"type\":\"fields\",\"token\":6,\"has_robber\":false},{\"id\":16,\"position\":[3,3],\"axial_coords\":[1,1],\"type\":\"pasture\",\"token\":11,\"has_robber\":false},{\"id\":17,\"position\":[4,0],\"axial_coords\":[-2,2],\"type\":\"mountains\",\"token\":5,\"has_robber\":false},{\"id\":18,\"position\":[4,1],\"axial_coords\":[-1,2],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":19,\"position\":[4,2],\"axial_coords\":[0,2],\"type\":\"mountains\",\"token\":2,\"has_robber\":false}],\"robber_position\":[2,2]},\"players_state\":[{\"player_id\":0,\"name\":\"A\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0},{\"player_id\":1,\"name\":\"B\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0}]}", - "constraints": { - "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] - } - }, - "response_schema": { - "type": "object", - "required": [ - "internal_thinking", - "action" - ], - "properties": { - "internal_thinking": { - "type": "string", - "description": "Private strategy. What's your plan and why?", - "minLength": 1000 - }, - "note_to_self": { - "type": "string", - "description": "Important facts for when it's your turn. Use only if essential for clarity or direct user query. Omit otherwise.", - "maxLength": 100 - }, - "say_outloud": { - "type": "string", - "description": "A short message to other players (max 100 chars). Use for negotiation, threats, or table talk. Keep in mind you pay for speak outload.", - "maxLength": 100 - }, - "action": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "The action type (must match one from allowed_actions in constraints)" - }, - "parameters": { - "type": "string", - "description": "Action parameters as JSON string. Example: {\"node\": 14} or {} if no parameters needed" - } - }, - "propertyOrdering": [ - "type", - "parameters" - ] - } - }, - "propertyOrdering": [ - "internal_thinking", - "note_to_self", - "say_outloud", - "action" - ] - }, - "what_happened": "• Game 644b2993-1279-436d-b7e1-f0fd259a42d9 has started with 2 players!\n• Game 644b2993-1279-436d-b7e1-f0fd259a42d9 has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_001335/A/prompts/prompt_1.txt b/examples/ai_testing/my_games/session_20260109_001335/A/prompts/prompt_1.txt deleted file mode 100644 index 283b41ef61cfdf3e1ba5bec5060a898ff443527f..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_001335/A/prompts/prompt_1.txt +++ /dev/null @@ -1,89 +0,0 @@ -=== Prompt #1 for A === -Timestamp: 2026-01-09T00:13:37.230114 -Active Turn: True - ---- What Happened --- -• Game 644b2993-1279-436d-b7e1-f0fd259a42d9 has started with 2 players! -• Game 644b2993-1279-436d-b7e1-f0fd259a42d9 has started with 2 players! -• Turn 0: Player 0's turn begins. -• Turn 0: Player 0's turn begins. - ---- Response Schema --- -{ - "type": "object", - "required": [ - "internal_thinking", - "action" - ], - "properties": { - "internal_thinking": { - "type": "string", - "description": "Private strategy. What's your plan and why?", - "minLength": 1000 - }, - "note_to_self": { - "type": "string", - "description": "Important facts for when it's your turn. Use only if essential for clarity or direct user query. Omit otherwise.", - "maxLength": 100 - }, - "say_outloud": { - "type": "string", - "description": "A short message to other players (max 100 chars). Use for negotiation, threats, or table talk. Keep in mind you pay for speak outload.", - "maxLength": 100 - }, - "action": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "The action type (must match one from allowed_actions in constraints)" - }, - "parameters": { - "type": "string", - "description": "Action parameters as JSON string. Example: {\"node\": 14} or {} if no parameters needed" - } - }, - "propertyOrdering": [ - "type", - "parameters" - ] - } - }, - "propertyOrdering": [ - "internal_thinking", - "note_to_self", - "say_outloud", - "action" - ] -} - ---- Prompt Content --- -{ - "meta_data": { - "agent_name": "A", - "role": null - }, - "task_context": { - "what_just_happened": "• Game 644b2993-1279-436d-b7e1-f0fd259a42d9 has started with 2 players!\n• Game 644b2993-1279-436d-b7e1-f0fd259a42d9 has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." - }, - "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"game_id\":\"644b2993-1279-436d-b7e1-f0fd259a42d9\",\"turn_number\":0,\"current_player\":0,\"game_phase\":\"SETUP_FIRST_ROUND\",\"turn_phase\":\"ROLL_DICE\",\"dice_rolled\":null,\"allowed_actions\":[\"PLACE_STARTING_SETTLEMENT\"],\"board_state\":{\"tiles\":[{\"id\":1,\"position\":[0,0],\"axial_coords\":[0,-2],\"type\":\"forest\",\"token\":12,\"has_robber\":false},{\"id\":2,\"position\":[0,1],\"axial_coords\":[1,-2],\"type\":\"pasture\",\"token\":5,\"has_robber\":false},{\"id\":3,\"position\":[0,2],\"axial_coords\":[2,-2],\"type\":\"forest\",\"token\":4,\"has_robber\":false},{\"id\":4,\"position\":[1,0],\"axial_coords\":[-1,-1],\"type\":\"pasture\",\"token\":8,\"has_robber\":false},{\"id\":5,\"position\":[1,1],\"axial_coords\":[0,-1],\"type\":\"hills\",\"token\":6,\"has_robber\":false},{\"id\":6,\"position\":[1,2],\"axial_coords\":[1,-1],\"type\":\"forest\",\"token\":3,\"has_robber\":false},{\"id\":7,\"position\":[1,3],\"axial_coords\":[2,-1],\"type\":\"fields\",\"token\":8,\"has_robber\":false},{\"id\":8,\"position\":[2,0],\"axial_coords\":[-2,0],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":9,\"position\":[2,1],\"axial_coords\":[-1,0],\"type\":\"forest\",\"token\":11,\"has_robber\":false},{\"id\":10,\"position\":[2,2],\"axial_coords\":[0,0],\"type\":\"desert\",\"token\":null,\"has_robber\":true},{\"id\":11,\"position\":[2,3],\"axial_coords\":[1,0],\"type\":\"mountains\",\"token\":3,\"has_robber\":false},{\"id\":12,\"position\":[2,4],\"axial_coords\":[2,0],\"type\":\"pasture\",\"token\":4,\"has_robber\":false},{\"id\":13,\"position\":[3,0],\"axial_coords\":[-2,1],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":14,\"position\":[3,1],\"axial_coords\":[-1,1],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":15,\"position\":[3,2],\"axial_coords\":[0,1],\"type\":\"fields\",\"token\":6,\"has_robber\":false},{\"id\":16,\"position\":[3,3],\"axial_coords\":[1,1],\"type\":\"pasture\",\"token\":11,\"has_robber\":false},{\"id\":17,\"position\":[4,0],\"axial_coords\":[-2,2],\"type\":\"mountains\",\"token\":5,\"has_robber\":false},{\"id\":18,\"position\":[4,1],\"axial_coords\":[-1,2],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":19,\"position\":[4,2],\"axial_coords\":[0,2],\"type\":\"mountains\",\"token\":2,\"has_robber\":false}],\"robber_position\":[2,2]},\"players_state\":[{\"player_id\":0,\"name\":\"A\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0},{\"player_id\":1,\"name\":\"B\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0}]}", - "constraints": { - "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] - } -} diff --git a/examples/ai_testing/my_games/session_20260109_001335/A/responses/response_1.json b/examples/ai_testing/my_games/session_20260109_001335/A/responses/response_1.json deleted file mode 100644 index 6b6e1fca7f35b9e0538dea3b3f36cd99189e3cc4..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_001335/A/responses/response_1.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "request_number": 1, - "timestamp": "2026-01-09T00:13:40.386368", - "player_name": "A", - "success": false, - "raw_content": null, - "parsed": null, - "model": "gemini-2.0-flash-exp", - "tokens": { - "prompt": 0, - "completion": 0, - "total": 0 - }, - "latency_seconds": 0.5389194488525391, - "error": "400 INVALID_ARGUMENT. {'error': {'code': 400, 'message': 'Unable to submit request because thinking is not supported by this model. Learn more: https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/gemini', 'status': 'INVALID_ARGUMENT'}}" -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_001335/session_metadata.json b/examples/ai_testing/my_games/session_20260109_001335/session_metadata.json deleted file mode 100644 index e6274430a9975c96cc7e326415696a2a028ab36e..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_001335/session_metadata.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "session_id": "session_20260109_001335", - "start_time": "2026-01-09T00:13:35.182525", - "version": "2.0" -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_001517/A/A.md b/examples/ai_testing/my_games/session_20260109_001517/A/A.md deleted file mode 100644 index 8a5ea0153c5e3256d9cf078c58cc8119613affce..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_001517/A/A.md +++ /dev/null @@ -1,28 +0,0 @@ -# AI Agent Log: A - -**Session:** session_20260109_001517 -**Started:** 2026-01-09 00:15:17 -**Model:** gemini-2.0-flash - ---- - - -## Request #1 - šŸŽÆ ACTIVE TURN - -**Time:** 00:15:19 - -### What Happened -• Game 3163a004-80a4-4227-8a19-f13fa3f24f0f has started with 2 players! -• Game 3163a004-80a4-4227-8a19-f13fa3f24f0f has started with 2 players! -• Turn 0: Player 0's turn begins. -• Turn 0: Player 0's turn begins. - -### Prompt Sent -See: [prompt_1.json](prompts/prompt_1.json) - -### Response Failed āŒ - -**Error:** 404 NOT_FOUND. {'error': {'code': 404, 'message': 'models/gemini-2.0-flash-thinking-exp is not found for API version v1beta, or is not supported for generateContent. Call ListModels to see the list of available models and their supported methods.', 'status': 'NOT_FOUND'}} -**Latency:** 0.18s - ---- diff --git a/examples/ai_testing/my_games/session_20260109_001517/A/prompts/prompt_1.json b/examples/ai_testing/my_games/session_20260109_001517/A/prompts/prompt_1.json deleted file mode 100644 index db3a04cde052f30a4245eb366ab5f0c01af21dab..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_001517/A/prompts/prompt_1.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "request_number": 1, - "timestamp": "2026-01-09T00:15:19.674095", - "player_name": "A", - "is_active_turn": true, - "prompt": { - "meta_data": { - "agent_name": "A", - "role": null - }, - "task_context": { - "what_just_happened": "• Game 3163a004-80a4-4227-8a19-f13fa3f24f0f has started with 2 players!\n• Game 3163a004-80a4-4227-8a19-f13fa3f24f0f has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." - }, - "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"game_id\":\"3163a004-80a4-4227-8a19-f13fa3f24f0f\",\"turn_number\":0,\"current_player\":0,\"game_phase\":\"SETUP_FIRST_ROUND\",\"turn_phase\":\"ROLL_DICE\",\"dice_rolled\":null,\"allowed_actions\":[\"PLACE_STARTING_SETTLEMENT\"],\"board_state\":{\"tiles\":[{\"id\":1,\"position\":[0,0],\"axial_coords\":[0,-2],\"type\":\"forest\",\"token\":12,\"has_robber\":false},{\"id\":2,\"position\":[0,1],\"axial_coords\":[1,-2],\"type\":\"pasture\",\"token\":5,\"has_robber\":false},{\"id\":3,\"position\":[0,2],\"axial_coords\":[2,-2],\"type\":\"forest\",\"token\":4,\"has_robber\":false},{\"id\":4,\"position\":[1,0],\"axial_coords\":[-1,-1],\"type\":\"pasture\",\"token\":8,\"has_robber\":false},{\"id\":5,\"position\":[1,1],\"axial_coords\":[0,-1],\"type\":\"hills\",\"token\":6,\"has_robber\":false},{\"id\":6,\"position\":[1,2],\"axial_coords\":[1,-1],\"type\":\"forest\",\"token\":3,\"has_robber\":false},{\"id\":7,\"position\":[1,3],\"axial_coords\":[2,-1],\"type\":\"fields\",\"token\":8,\"has_robber\":false},{\"id\":8,\"position\":[2,0],\"axial_coords\":[-2,0],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":9,\"position\":[2,1],\"axial_coords\":[-1,0],\"type\":\"forest\",\"token\":11,\"has_robber\":false},{\"id\":10,\"position\":[2,2],\"axial_coords\":[0,0],\"type\":\"desert\",\"token\":null,\"has_robber\":true},{\"id\":11,\"position\":[2,3],\"axial_coords\":[1,0],\"type\":\"mountains\",\"token\":3,\"has_robber\":false},{\"id\":12,\"position\":[2,4],\"axial_coords\":[2,0],\"type\":\"pasture\",\"token\":4,\"has_robber\":false},{\"id\":13,\"position\":[3,0],\"axial_coords\":[-2,1],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":14,\"position\":[3,1],\"axial_coords\":[-1,1],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":15,\"position\":[3,2],\"axial_coords\":[0,1],\"type\":\"fields\",\"token\":6,\"has_robber\":false},{\"id\":16,\"position\":[3,3],\"axial_coords\":[1,1],\"type\":\"pasture\",\"token\":11,\"has_robber\":false},{\"id\":17,\"position\":[4,0],\"axial_coords\":[-2,2],\"type\":\"mountains\",\"token\":5,\"has_robber\":false},{\"id\":18,\"position\":[4,1],\"axial_coords\":[-1,2],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":19,\"position\":[4,2],\"axial_coords\":[0,2],\"type\":\"mountains\",\"token\":2,\"has_robber\":false}],\"robber_position\":[2,2]},\"players_state\":[{\"player_id\":0,\"name\":\"A\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0},{\"player_id\":1,\"name\":\"B\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0}]}", - "constraints": { - "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] - } - }, - "response_schema": { - "type": "object", - "required": [ - "internal_thinking", - "action" - ], - "properties": { - "internal_thinking": { - "type": "string", - "description": "Private strategy. What's your plan and why?", - "minLength": 1000 - }, - "note_to_self": { - "type": "string", - "description": "Important facts for when it's your turn. Use only if essential for clarity or direct user query. Omit otherwise.", - "maxLength": 100 - }, - "say_outloud": { - "type": "string", - "description": "A short message to other players (max 100 chars). Use for negotiation, threats, or table talk. Keep in mind you pay for speak outload.", - "maxLength": 100 - }, - "action": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "The action type (must match one from allowed_actions in constraints)" - }, - "parameters": { - "type": "string", - "description": "Action parameters as JSON string. Example: {\"node\": 14} or {} if no parameters needed" - } - }, - "propertyOrdering": [ - "type", - "parameters" - ] - } - }, - "propertyOrdering": [ - "internal_thinking", - "note_to_self", - "say_outloud", - "action" - ] - }, - "what_happened": "• Game 3163a004-80a4-4227-8a19-f13fa3f24f0f has started with 2 players!\n• Game 3163a004-80a4-4227-8a19-f13fa3f24f0f has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_001517/A/prompts/prompt_1.txt b/examples/ai_testing/my_games/session_20260109_001517/A/prompts/prompt_1.txt deleted file mode 100644 index bfb61ccd92eed1c5fc4c4a91fabb63b62f862ba8..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_001517/A/prompts/prompt_1.txt +++ /dev/null @@ -1,89 +0,0 @@ -=== Prompt #1 for A === -Timestamp: 2026-01-09T00:15:19.675143 -Active Turn: True - ---- What Happened --- -• Game 3163a004-80a4-4227-8a19-f13fa3f24f0f has started with 2 players! -• Game 3163a004-80a4-4227-8a19-f13fa3f24f0f has started with 2 players! -• Turn 0: Player 0's turn begins. -• Turn 0: Player 0's turn begins. - ---- Response Schema --- -{ - "type": "object", - "required": [ - "internal_thinking", - "action" - ], - "properties": { - "internal_thinking": { - "type": "string", - "description": "Private strategy. What's your plan and why?", - "minLength": 1000 - }, - "note_to_self": { - "type": "string", - "description": "Important facts for when it's your turn. Use only if essential for clarity or direct user query. Omit otherwise.", - "maxLength": 100 - }, - "say_outloud": { - "type": "string", - "description": "A short message to other players (max 100 chars). Use for negotiation, threats, or table talk. Keep in mind you pay for speak outload.", - "maxLength": 100 - }, - "action": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "The action type (must match one from allowed_actions in constraints)" - }, - "parameters": { - "type": "string", - "description": "Action parameters as JSON string. Example: {\"node\": 14} or {} if no parameters needed" - } - }, - "propertyOrdering": [ - "type", - "parameters" - ] - } - }, - "propertyOrdering": [ - "internal_thinking", - "note_to_self", - "say_outloud", - "action" - ] -} - ---- Prompt Content --- -{ - "meta_data": { - "agent_name": "A", - "role": null - }, - "task_context": { - "what_just_happened": "• Game 3163a004-80a4-4227-8a19-f13fa3f24f0f has started with 2 players!\n• Game 3163a004-80a4-4227-8a19-f13fa3f24f0f has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." - }, - "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"game_id\":\"3163a004-80a4-4227-8a19-f13fa3f24f0f\",\"turn_number\":0,\"current_player\":0,\"game_phase\":\"SETUP_FIRST_ROUND\",\"turn_phase\":\"ROLL_DICE\",\"dice_rolled\":null,\"allowed_actions\":[\"PLACE_STARTING_SETTLEMENT\"],\"board_state\":{\"tiles\":[{\"id\":1,\"position\":[0,0],\"axial_coords\":[0,-2],\"type\":\"forest\",\"token\":12,\"has_robber\":false},{\"id\":2,\"position\":[0,1],\"axial_coords\":[1,-2],\"type\":\"pasture\",\"token\":5,\"has_robber\":false},{\"id\":3,\"position\":[0,2],\"axial_coords\":[2,-2],\"type\":\"forest\",\"token\":4,\"has_robber\":false},{\"id\":4,\"position\":[1,0],\"axial_coords\":[-1,-1],\"type\":\"pasture\",\"token\":8,\"has_robber\":false},{\"id\":5,\"position\":[1,1],\"axial_coords\":[0,-1],\"type\":\"hills\",\"token\":6,\"has_robber\":false},{\"id\":6,\"position\":[1,2],\"axial_coords\":[1,-1],\"type\":\"forest\",\"token\":3,\"has_robber\":false},{\"id\":7,\"position\":[1,3],\"axial_coords\":[2,-1],\"type\":\"fields\",\"token\":8,\"has_robber\":false},{\"id\":8,\"position\":[2,0],\"axial_coords\":[-2,0],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":9,\"position\":[2,1],\"axial_coords\":[-1,0],\"type\":\"forest\",\"token\":11,\"has_robber\":false},{\"id\":10,\"position\":[2,2],\"axial_coords\":[0,0],\"type\":\"desert\",\"token\":null,\"has_robber\":true},{\"id\":11,\"position\":[2,3],\"axial_coords\":[1,0],\"type\":\"mountains\",\"token\":3,\"has_robber\":false},{\"id\":12,\"position\":[2,4],\"axial_coords\":[2,0],\"type\":\"pasture\",\"token\":4,\"has_robber\":false},{\"id\":13,\"position\":[3,0],\"axial_coords\":[-2,1],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":14,\"position\":[3,1],\"axial_coords\":[-1,1],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":15,\"position\":[3,2],\"axial_coords\":[0,1],\"type\":\"fields\",\"token\":6,\"has_robber\":false},{\"id\":16,\"position\":[3,3],\"axial_coords\":[1,1],\"type\":\"pasture\",\"token\":11,\"has_robber\":false},{\"id\":17,\"position\":[4,0],\"axial_coords\":[-2,2],\"type\":\"mountains\",\"token\":5,\"has_robber\":false},{\"id\":18,\"position\":[4,1],\"axial_coords\":[-1,2],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":19,\"position\":[4,2],\"axial_coords\":[0,2],\"type\":\"mountains\",\"token\":2,\"has_robber\":false}],\"robber_position\":[2,2]},\"players_state\":[{\"player_id\":0,\"name\":\"A\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0},{\"player_id\":1,\"name\":\"B\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0}]}", - "constraints": { - "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] - } -} diff --git a/examples/ai_testing/my_games/session_20260109_001517/A/responses/response_1.json b/examples/ai_testing/my_games/session_20260109_001517/A/responses/response_1.json deleted file mode 100644 index 1a4819b16756c1c13cf04c43fa14bd3b0adf0048..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_001517/A/responses/response_1.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "request_number": 1, - "timestamp": "2026-01-09T00:15:21.059718", - "player_name": "A", - "success": false, - "raw_content": null, - "parsed": null, - "model": "gemini-2.0-flash-thinking-exp", - "tokens": { - "prompt": 0, - "completion": 0, - "total": 0 - }, - "latency_seconds": 0.18188214302062988, - "error": "404 NOT_FOUND. {'error': {'code': 404, 'message': 'models/gemini-2.0-flash-thinking-exp is not found for API version v1beta, or is not supported for generateContent. Call ListModels to see the list of available models and their supported methods.', 'status': 'NOT_FOUND'}}" -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_001517/session_metadata.json b/examples/ai_testing/my_games/session_20260109_001517/session_metadata.json deleted file mode 100644 index 0cbc2ae8a689c29e14c5cb8e0567592f506ce7c6..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_001517/session_metadata.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "session_id": "session_20260109_001517", - "start_time": "2026-01-09T00:15:17.619306", - "version": "2.0" -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_001818/A/A.md b/examples/ai_testing/my_games/session_20260109_001818/A/A.md deleted file mode 100644 index 7939635675e0eefc9234f08608ed35dd20247d9b..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_001818/A/A.md +++ /dev/null @@ -1,29 +0,0 @@ -# AI Agent Log: A - -**Session:** session_20260109_001818 -**Started:** 2026-01-09 00:18:18 -**Model:** gemini-2.0-flash - ---- - - -## Request #1 - šŸŽÆ ACTIVE TURN - -**Time:** 00:18:20 - -### What Happened -• Game 83a90cb5-674c-42f4-b9f9-260766f8f54a has started with 2 players! -• Game 83a90cb5-674c-42f4-b9f9-260766f8f54a has started with 2 players! -• Turn 0: Player 0's turn begins. -• Turn 0: Player 0's turn begins. - -### Prompt Sent -See: [prompt_1.json](prompts/prompt_1.json) - -### Response Received āœ… - -**Latency:** 20.28s | **Tokens:** 5520 - -**Thinking:** The goal is to place the first settlement optimally. An optimal settlement location provides high-probability resources (numbers 6, 8, 5, 9) and diverse resource types. I've identified a strong cluste... - ---- diff --git a/examples/ai_testing/my_games/session_20260109_001818/A/prompts/prompt_1.json b/examples/ai_testing/my_games/session_20260109_001818/A/prompts/prompt_1.json deleted file mode 100644 index 561904fa7d8146300953717c977795adeee0761d..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_001818/A/prompts/prompt_1.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "request_number": 1, - "timestamp": "2026-01-09T00:18:20.460260", - "player_name": "A", - "is_active_turn": true, - "prompt": { - "meta_data": { - "agent_name": "A", - "role": null - }, - "task_context": { - "what_just_happened": "• Game 83a90cb5-674c-42f4-b9f9-260766f8f54a has started with 2 players!\n• Game 83a90cb5-674c-42f4-b9f9-260766f8f54a has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." - }, - "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"game_id\":\"83a90cb5-674c-42f4-b9f9-260766f8f54a\",\"turn_number\":0,\"current_player\":0,\"game_phase\":\"SETUP_FIRST_ROUND\",\"turn_phase\":\"ROLL_DICE\",\"dice_rolled\":null,\"allowed_actions\":[\"PLACE_STARTING_SETTLEMENT\"],\"board_state\":{\"tiles\":[{\"id\":1,\"position\":[0,0],\"axial_coords\":[0,-2],\"type\":\"forest\",\"token\":12,\"has_robber\":false},{\"id\":2,\"position\":[0,1],\"axial_coords\":[1,-2],\"type\":\"pasture\",\"token\":5,\"has_robber\":false},{\"id\":3,\"position\":[0,2],\"axial_coords\":[2,-2],\"type\":\"forest\",\"token\":4,\"has_robber\":false},{\"id\":4,\"position\":[1,0],\"axial_coords\":[-1,-1],\"type\":\"pasture\",\"token\":8,\"has_robber\":false},{\"id\":5,\"position\":[1,1],\"axial_coords\":[0,-1],\"type\":\"hills\",\"token\":6,\"has_robber\":false},{\"id\":6,\"position\":[1,2],\"axial_coords\":[1,-1],\"type\":\"forest\",\"token\":3,\"has_robber\":false},{\"id\":7,\"position\":[1,3],\"axial_coords\":[2,-1],\"type\":\"fields\",\"token\":8,\"has_robber\":false},{\"id\":8,\"position\":[2,0],\"axial_coords\":[-2,0],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":9,\"position\":[2,1],\"axial_coords\":[-1,0],\"type\":\"forest\",\"token\":11,\"has_robber\":false},{\"id\":10,\"position\":[2,2],\"axial_coords\":[0,0],\"type\":\"desert\",\"token\":null,\"has_robber\":true},{\"id\":11,\"position\":[2,3],\"axial_coords\":[1,0],\"type\":\"mountains\",\"token\":3,\"has_robber\":false},{\"id\":12,\"position\":[2,4],\"axial_coords\":[2,0],\"type\":\"pasture\",\"token\":4,\"has_robber\":false},{\"id\":13,\"position\":[3,0],\"axial_coords\":[-2,1],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":14,\"position\":[3,1],\"axial_coords\":[-1,1],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":15,\"position\":[3,2],\"axial_coords\":[0,1],\"type\":\"fields\",\"token\":6,\"has_robber\":false},{\"id\":16,\"position\":[3,3],\"axial_coords\":[1,1],\"type\":\"pasture\",\"token\":11,\"has_robber\":false},{\"id\":17,\"position\":[4,0],\"axial_coords\":[-2,2],\"type\":\"mountains\",\"token\":5,\"has_robber\":false},{\"id\":18,\"position\":[4,1],\"axial_coords\":[-1,2],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":19,\"position\":[4,2],\"axial_coords\":[0,2],\"type\":\"mountains\",\"token\":2,\"has_robber\":false}],\"robber_position\":[2,2]},\"players_state\":[{\"player_id\":0,\"name\":\"A\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0},{\"player_id\":1,\"name\":\"B\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0}]}", - "constraints": { - "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] - } - }, - "response_schema": { - "type": "object", - "required": [ - "internal_thinking", - "action" - ], - "properties": { - "internal_thinking": { - "type": "string", - "description": "Private strategy. What's your plan and why?", - "minLength": 1000 - }, - "note_to_self": { - "type": "string", - "description": "Important facts for when it's your turn. Use only if essential for clarity or direct user query. Omit otherwise.", - "maxLength": 100 - }, - "say_outloud": { - "type": "string", - "description": "A short message to other players (max 100 chars). Use for negotiation, threats, or table talk. Keep in mind you pay for speak outload.", - "maxLength": 100 - }, - "action": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "The action type (must match one from allowed_actions in constraints)" - }, - "parameters": { - "type": "string", - "description": "Action parameters as JSON string. Example: {\"node\": 14} or {} if no parameters needed" - } - }, - "propertyOrdering": [ - "type", - "parameters" - ] - } - }, - "propertyOrdering": [ - "internal_thinking", - "note_to_self", - "say_outloud", - "action" - ] - }, - "what_happened": "• Game 83a90cb5-674c-42f4-b9f9-260766f8f54a has started with 2 players!\n• Game 83a90cb5-674c-42f4-b9f9-260766f8f54a has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_001818/A/prompts/prompt_1.txt b/examples/ai_testing/my_games/session_20260109_001818/A/prompts/prompt_1.txt deleted file mode 100644 index 8c7213b662b76e68b8e6a599ef9515aa95f51343..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_001818/A/prompts/prompt_1.txt +++ /dev/null @@ -1,89 +0,0 @@ -=== Prompt #1 for A === -Timestamp: 2026-01-09T00:18:20.461419 -Active Turn: True - ---- What Happened --- -• Game 83a90cb5-674c-42f4-b9f9-260766f8f54a has started with 2 players! -• Game 83a90cb5-674c-42f4-b9f9-260766f8f54a has started with 2 players! -• Turn 0: Player 0's turn begins. -• Turn 0: Player 0's turn begins. - ---- Response Schema --- -{ - "type": "object", - "required": [ - "internal_thinking", - "action" - ], - "properties": { - "internal_thinking": { - "type": "string", - "description": "Private strategy. What's your plan and why?", - "minLength": 1000 - }, - "note_to_self": { - "type": "string", - "description": "Important facts for when it's your turn. Use only if essential for clarity or direct user query. Omit otherwise.", - "maxLength": 100 - }, - "say_outloud": { - "type": "string", - "description": "A short message to other players (max 100 chars). Use for negotiation, threats, or table talk. Keep in mind you pay for speak outload.", - "maxLength": 100 - }, - "action": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "The action type (must match one from allowed_actions in constraints)" - }, - "parameters": { - "type": "string", - "description": "Action parameters as JSON string. Example: {\"node\": 14} or {} if no parameters needed" - } - }, - "propertyOrdering": [ - "type", - "parameters" - ] - } - }, - "propertyOrdering": [ - "internal_thinking", - "note_to_self", - "say_outloud", - "action" - ] -} - ---- Prompt Content --- -{ - "meta_data": { - "agent_name": "A", - "role": null - }, - "task_context": { - "what_just_happened": "• Game 83a90cb5-674c-42f4-b9f9-260766f8f54a has started with 2 players!\n• Game 83a90cb5-674c-42f4-b9f9-260766f8f54a has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." - }, - "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"game_id\":\"83a90cb5-674c-42f4-b9f9-260766f8f54a\",\"turn_number\":0,\"current_player\":0,\"game_phase\":\"SETUP_FIRST_ROUND\",\"turn_phase\":\"ROLL_DICE\",\"dice_rolled\":null,\"allowed_actions\":[\"PLACE_STARTING_SETTLEMENT\"],\"board_state\":{\"tiles\":[{\"id\":1,\"position\":[0,0],\"axial_coords\":[0,-2],\"type\":\"forest\",\"token\":12,\"has_robber\":false},{\"id\":2,\"position\":[0,1],\"axial_coords\":[1,-2],\"type\":\"pasture\",\"token\":5,\"has_robber\":false},{\"id\":3,\"position\":[0,2],\"axial_coords\":[2,-2],\"type\":\"forest\",\"token\":4,\"has_robber\":false},{\"id\":4,\"position\":[1,0],\"axial_coords\":[-1,-1],\"type\":\"pasture\",\"token\":8,\"has_robber\":false},{\"id\":5,\"position\":[1,1],\"axial_coords\":[0,-1],\"type\":\"hills\",\"token\":6,\"has_robber\":false},{\"id\":6,\"position\":[1,2],\"axial_coords\":[1,-1],\"type\":\"forest\",\"token\":3,\"has_robber\":false},{\"id\":7,\"position\":[1,3],\"axial_coords\":[2,-1],\"type\":\"fields\",\"token\":8,\"has_robber\":false},{\"id\":8,\"position\":[2,0],\"axial_coords\":[-2,0],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":9,\"position\":[2,1],\"axial_coords\":[-1,0],\"type\":\"forest\",\"token\":11,\"has_robber\":false},{\"id\":10,\"position\":[2,2],\"axial_coords\":[0,0],\"type\":\"desert\",\"token\":null,\"has_robber\":true},{\"id\":11,\"position\":[2,3],\"axial_coords\":[1,0],\"type\":\"mountains\",\"token\":3,\"has_robber\":false},{\"id\":12,\"position\":[2,4],\"axial_coords\":[2,0],\"type\":\"pasture\",\"token\":4,\"has_robber\":false},{\"id\":13,\"position\":[3,0],\"axial_coords\":[-2,1],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":14,\"position\":[3,1],\"axial_coords\":[-1,1],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":15,\"position\":[3,2],\"axial_coords\":[0,1],\"type\":\"fields\",\"token\":6,\"has_robber\":false},{\"id\":16,\"position\":[3,3],\"axial_coords\":[1,1],\"type\":\"pasture\",\"token\":11,\"has_robber\":false},{\"id\":17,\"position\":[4,0],\"axial_coords\":[-2,2],\"type\":\"mountains\",\"token\":5,\"has_robber\":false},{\"id\":18,\"position\":[4,1],\"axial_coords\":[-1,2],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":19,\"position\":[4,2],\"axial_coords\":[0,2],\"type\":\"mountains\",\"token\":2,\"has_robber\":false}],\"robber_position\":[2,2]},\"players_state\":[{\"player_id\":0,\"name\":\"A\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0},{\"player_id\":1,\"name\":\"B\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0}]}", - "constraints": { - "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] - } -} diff --git a/examples/ai_testing/my_games/session_20260109_001818/A/responses/response_1.json b/examples/ai_testing/my_games/session_20260109_001818/A/responses/response_1.json deleted file mode 100644 index 9e8d5c91883e254c22659165e8e6b12edc7ba840..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_001818/A/responses/response_1.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "request_number": 1, - "timestamp": "2026-01-09T00:18:41.865242", - "player_name": "A", - "success": true, - "raw_content": "{\"internal_thinking\": \"The goal is to place the first settlement optimally. An optimal settlement location provides high-probability resources (numbers 6, 8, 5, 9) and diverse resource types. I've identified a strong cluster of hexes: Hex 5 (Brick 6), Hex 9 (Wood 11), and Hex 14 (Wheat 9). This combination offers Brick, Wood, and Wheat with excellent production numbers (6, 11, 9). This is ideal for early game development, providing resources for building (Wood, Brick) and for further development/cities (Wheat). The game state JSON, however, does not provide the 'N' (Nodes) lookup table, which means I cannot directly map this ideal physical location to a specific 'node' ID. Given this lack of information, I will select 'node: 14' as shown in the example parameters, assuming it represents a valid and reasonably central or good node on the board. Without the node-to-hex mapping, I cannot be more precise in my selection.\", \"action\": {\"type\": \"place_starting_settlement\", \"parameters\": \"{\\\"node\\\": 14}\"}}", - "parsed": { - "internal_thinking": "The goal is to place the first settlement optimally. An optimal settlement location provides high-probability resources (numbers 6, 8, 5, 9) and diverse resource types. I've identified a strong cluster of hexes: Hex 5 (Brick 6), Hex 9 (Wood 11), and Hex 14 (Wheat 9). This combination offers Brick, Wood, and Wheat with excellent production numbers (6, 11, 9). This is ideal for early game development, providing resources for building (Wood, Brick) and for further development/cities (Wheat). The game state JSON, however, does not provide the 'N' (Nodes) lookup table, which means I cannot directly map this ideal physical location to a specific 'node' ID. Given this lack of information, I will select 'node: 14' as shown in the example parameters, assuming it represents a valid and reasonably central or good node on the board. Without the node-to-hex mapping, I cannot be more precise in my selection. [Response was too brief]", - "note_to_self": null, - "say_outloud": null, - "action_type": "place_starting_settlement", - "parameters": { - "node": 14 - } - }, - "model": "models/gemini-2.5-flash", - "tokens": { - "prompt": 1698, - "completion": 251, - "total": 5520 - }, - "latency_seconds": 20.28097152709961, - "error": null -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_001818/session_metadata.json b/examples/ai_testing/my_games/session_20260109_001818/session_metadata.json deleted file mode 100644 index 6cc8634eed75ec3922ab1e42255673943c9c0ae2..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_001818/session_metadata.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "session_id": "session_20260109_001818", - "start_time": "2026-01-09T00:18:18.406578", - "version": "2.0" -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_001931/A/A.md b/examples/ai_testing/my_games/session_20260109_001931/A/A.md deleted file mode 100644 index 1ee0cf87d384136646016b36089a402a768edc72..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_001931/A/A.md +++ /dev/null @@ -1,28 +0,0 @@ -# AI Agent Log: A - -**Session:** session_20260109_001931 -**Started:** 2026-01-09 00:19:31 -**Model:** gemini-2.0-flash - ---- - - -## Request #1 - šŸŽÆ ACTIVE TURN - -**Time:** 00:19:33 - -### What Happened -• Game d0748635-4fce-4fb8-a8cf-cd2bf088ea01 has started with 2 players! -• Game d0748635-4fce-4fb8-a8cf-cd2bf088ea01 has started with 2 players! -• Turn 0: Player 0's turn begins. -• Turn 0: Player 0's turn begins. - -### Prompt Sent -See: [prompt_1.json](prompts/prompt_1.json) - -### Response Failed āŒ - -**Error:** Unknown error -**Latency:** 17.50s - ---- diff --git a/examples/ai_testing/my_games/session_20260109_001931/A/prompts/prompt_1.json b/examples/ai_testing/my_games/session_20260109_001931/A/prompts/prompt_1.json deleted file mode 100644 index b433e7df477085b49964f9c6a0cfaeb199c1bf00..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_001931/A/prompts/prompt_1.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "request_number": 1, - "timestamp": "2026-01-09T00:19:33.784747", - "player_name": "A", - "is_active_turn": true, - "prompt": { - "meta_data": { - "agent_name": "A", - "role": null - }, - "task_context": { - "what_just_happened": "• Game d0748635-4fce-4fb8-a8cf-cd2bf088ea01 has started with 2 players!\n• Game d0748635-4fce-4fb8-a8cf-cd2bf088ea01 has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." - }, - "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"game_id\":\"d0748635-4fce-4fb8-a8cf-cd2bf088ea01\",\"turn_number\":0,\"current_player\":0,\"game_phase\":\"SETUP_FIRST_ROUND\",\"turn_phase\":\"ROLL_DICE\",\"dice_rolled\":null,\"allowed_actions\":[\"PLACE_STARTING_SETTLEMENT\"],\"board_state\":{\"tiles\":[{\"id\":1,\"position\":[0,0],\"axial_coords\":[0,-2],\"type\":\"forest\",\"token\":12,\"has_robber\":false},{\"id\":2,\"position\":[0,1],\"axial_coords\":[1,-2],\"type\":\"pasture\",\"token\":5,\"has_robber\":false},{\"id\":3,\"position\":[0,2],\"axial_coords\":[2,-2],\"type\":\"forest\",\"token\":4,\"has_robber\":false},{\"id\":4,\"position\":[1,0],\"axial_coords\":[-1,-1],\"type\":\"pasture\",\"token\":8,\"has_robber\":false},{\"id\":5,\"position\":[1,1],\"axial_coords\":[0,-1],\"type\":\"hills\",\"token\":6,\"has_robber\":false},{\"id\":6,\"position\":[1,2],\"axial_coords\":[1,-1],\"type\":\"forest\",\"token\":3,\"has_robber\":false},{\"id\":7,\"position\":[1,3],\"axial_coords\":[2,-1],\"type\":\"fields\",\"token\":8,\"has_robber\":false},{\"id\":8,\"position\":[2,0],\"axial_coords\":[-2,0],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":9,\"position\":[2,1],\"axial_coords\":[-1,0],\"type\":\"forest\",\"token\":11,\"has_robber\":false},{\"id\":10,\"position\":[2,2],\"axial_coords\":[0,0],\"type\":\"desert\",\"token\":null,\"has_robber\":true},{\"id\":11,\"position\":[2,3],\"axial_coords\":[1,0],\"type\":\"mountains\",\"token\":3,\"has_robber\":false},{\"id\":12,\"position\":[2,4],\"axial_coords\":[2,0],\"type\":\"pasture\",\"token\":4,\"has_robber\":false},{\"id\":13,\"position\":[3,0],\"axial_coords\":[-2,1],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":14,\"position\":[3,1],\"axial_coords\":[-1,1],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":15,\"position\":[3,2],\"axial_coords\":[0,1],\"type\":\"fields\",\"token\":6,\"has_robber\":false},{\"id\":16,\"position\":[3,3],\"axial_coords\":[1,1],\"type\":\"pasture\",\"token\":11,\"has_robber\":false},{\"id\":17,\"position\":[4,0],\"axial_coords\":[-2,2],\"type\":\"mountains\",\"token\":5,\"has_robber\":false},{\"id\":18,\"position\":[4,1],\"axial_coords\":[-1,2],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":19,\"position\":[4,2],\"axial_coords\":[0,2],\"type\":\"mountains\",\"token\":2,\"has_robber\":false}],\"robber_position\":[2,2]},\"players_state\":[{\"player_id\":0,\"name\":\"A\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0},{\"player_id\":1,\"name\":\"B\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0}]}", - "constraints": { - "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] - } - }, - "response_schema": { - "type": "object", - "required": [ - "internal_thinking", - "action" - ], - "properties": { - "internal_thinking": { - "type": "string", - "description": "Private strategy. What's your plan and why?", - "minLength": 1000 - }, - "note_to_self": { - "type": "string", - "description": "Important facts for when it's your turn. Use only if essential for clarity or direct user query. Omit otherwise.", - "maxLength": 100 - }, - "say_outloud": { - "type": "string", - "description": "A short message to other players (max 100 chars). Use for negotiation, threats, or table talk. Keep in mind you pay for speak outload.", - "maxLength": 100 - }, - "action": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "The action type (must match one from allowed_actions in constraints)" - }, - "parameters": { - "type": "string", - "description": "Action parameters as JSON string. Example: {\"node\": 14} or {} if no parameters needed" - } - }, - "propertyOrdering": [ - "type", - "parameters" - ] - } - }, - "propertyOrdering": [ - "internal_thinking", - "note_to_self", - "say_outloud", - "action" - ] - }, - "what_happened": "• Game d0748635-4fce-4fb8-a8cf-cd2bf088ea01 has started with 2 players!\n• Game d0748635-4fce-4fb8-a8cf-cd2bf088ea01 has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_001931/A/prompts/prompt_1.txt b/examples/ai_testing/my_games/session_20260109_001931/A/prompts/prompt_1.txt deleted file mode 100644 index d0470d4416ac1ce7d0564d6917fb296d27b56b22..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_001931/A/prompts/prompt_1.txt +++ /dev/null @@ -1,89 +0,0 @@ -=== Prompt #1 for A === -Timestamp: 2026-01-09T00:19:33.786070 -Active Turn: True - ---- What Happened --- -• Game d0748635-4fce-4fb8-a8cf-cd2bf088ea01 has started with 2 players! -• Game d0748635-4fce-4fb8-a8cf-cd2bf088ea01 has started with 2 players! -• Turn 0: Player 0's turn begins. -• Turn 0: Player 0's turn begins. - ---- Response Schema --- -{ - "type": "object", - "required": [ - "internal_thinking", - "action" - ], - "properties": { - "internal_thinking": { - "type": "string", - "description": "Private strategy. What's your plan and why?", - "minLength": 1000 - }, - "note_to_self": { - "type": "string", - "description": "Important facts for when it's your turn. Use only if essential for clarity or direct user query. Omit otherwise.", - "maxLength": 100 - }, - "say_outloud": { - "type": "string", - "description": "A short message to other players (max 100 chars). Use for negotiation, threats, or table talk. Keep in mind you pay for speak outload.", - "maxLength": 100 - }, - "action": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "The action type (must match one from allowed_actions in constraints)" - }, - "parameters": { - "type": "string", - "description": "Action parameters as JSON string. Example: {\"node\": 14} or {} if no parameters needed" - } - }, - "propertyOrdering": [ - "type", - "parameters" - ] - } - }, - "propertyOrdering": [ - "internal_thinking", - "note_to_self", - "say_outloud", - "action" - ] -} - ---- Prompt Content --- -{ - "meta_data": { - "agent_name": "A", - "role": null - }, - "task_context": { - "what_just_happened": "• Game d0748635-4fce-4fb8-a8cf-cd2bf088ea01 has started with 2 players!\n• Game d0748635-4fce-4fb8-a8cf-cd2bf088ea01 has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." - }, - "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"game_id\":\"d0748635-4fce-4fb8-a8cf-cd2bf088ea01\",\"turn_number\":0,\"current_player\":0,\"game_phase\":\"SETUP_FIRST_ROUND\",\"turn_phase\":\"ROLL_DICE\",\"dice_rolled\":null,\"allowed_actions\":[\"PLACE_STARTING_SETTLEMENT\"],\"board_state\":{\"tiles\":[{\"id\":1,\"position\":[0,0],\"axial_coords\":[0,-2],\"type\":\"forest\",\"token\":12,\"has_robber\":false},{\"id\":2,\"position\":[0,1],\"axial_coords\":[1,-2],\"type\":\"pasture\",\"token\":5,\"has_robber\":false},{\"id\":3,\"position\":[0,2],\"axial_coords\":[2,-2],\"type\":\"forest\",\"token\":4,\"has_robber\":false},{\"id\":4,\"position\":[1,0],\"axial_coords\":[-1,-1],\"type\":\"pasture\",\"token\":8,\"has_robber\":false},{\"id\":5,\"position\":[1,1],\"axial_coords\":[0,-1],\"type\":\"hills\",\"token\":6,\"has_robber\":false},{\"id\":6,\"position\":[1,2],\"axial_coords\":[1,-1],\"type\":\"forest\",\"token\":3,\"has_robber\":false},{\"id\":7,\"position\":[1,3],\"axial_coords\":[2,-1],\"type\":\"fields\",\"token\":8,\"has_robber\":false},{\"id\":8,\"position\":[2,0],\"axial_coords\":[-2,0],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":9,\"position\":[2,1],\"axial_coords\":[-1,0],\"type\":\"forest\",\"token\":11,\"has_robber\":false},{\"id\":10,\"position\":[2,2],\"axial_coords\":[0,0],\"type\":\"desert\",\"token\":null,\"has_robber\":true},{\"id\":11,\"position\":[2,3],\"axial_coords\":[1,0],\"type\":\"mountains\",\"token\":3,\"has_robber\":false},{\"id\":12,\"position\":[2,4],\"axial_coords\":[2,0],\"type\":\"pasture\",\"token\":4,\"has_robber\":false},{\"id\":13,\"position\":[3,0],\"axial_coords\":[-2,1],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":14,\"position\":[3,1],\"axial_coords\":[-1,1],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":15,\"position\":[3,2],\"axial_coords\":[0,1],\"type\":\"fields\",\"token\":6,\"has_robber\":false},{\"id\":16,\"position\":[3,3],\"axial_coords\":[1,1],\"type\":\"pasture\",\"token\":11,\"has_robber\":false},{\"id\":17,\"position\":[4,0],\"axial_coords\":[-2,2],\"type\":\"mountains\",\"token\":5,\"has_robber\":false},{\"id\":18,\"position\":[4,1],\"axial_coords\":[-1,2],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":19,\"position\":[4,2],\"axial_coords\":[0,2],\"type\":\"mountains\",\"token\":2,\"has_robber\":false}],\"robber_position\":[2,2]},\"players_state\":[{\"player_id\":0,\"name\":\"A\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0},{\"player_id\":1,\"name\":\"B\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0}]}", - "constraints": { - "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] - } -} diff --git a/examples/ai_testing/my_games/session_20260109_001931/A/responses/response_1.json b/examples/ai_testing/my_games/session_20260109_001931/A/responses/response_1.json deleted file mode 100644 index a1152f83ea4690a7d0c68e9fd9e00ee4dd62aecc..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_001931/A/responses/response_1.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "request_number": 1, - "timestamp": "2026-01-09T00:19:52.853870", - "player_name": "A", - "success": true, - "raw_content": "{\"internal_thinking\":\"As Player 0 in the first round of setup, I need to place my initial settlement and road. My goal is to select a node that provides a good combination of resources and high-probability dice rolls. I've analyzed the board state to identify promising nodes. Node 19 stands out because it provides Wheat (9), Brick (10), and Ore (5). These are excellent resources for development (Wheat for cities, Brick for roads/settlements, Ore for cities) and the numbers (9, 10, 5) are all high-probability rolls. This offers strong early game potential for building and upgrading.\",\"action\":{\"type\":\"place_starting_settlement\",\"parameters\":\"{\\\"node\\\": ", - "parsed": null, - "model": "models/gemini-2.5-flash", - "tokens": { - "prompt": 1681, - "completion": 152, - "total": 5762 - }, - "latency_seconds": 17.496432304382324, - "error": null -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_001931/session_metadata.json b/examples/ai_testing/my_games/session_20260109_001931/session_metadata.json deleted file mode 100644 index 94a682b88f3846c8b09963d40134a7a8454c5453..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_001931/session_metadata.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "session_id": "session_20260109_001931", - "start_time": "2026-01-09T00:19:31.731224", - "version": "2.0" -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_002315/A/A.md b/examples/ai_testing/my_games/session_20260109_002315/A/A.md deleted file mode 100644 index bdb6a0cebf9781eab8b68a08ed02119a1c7a3dda..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_002315/A/A.md +++ /dev/null @@ -1,28 +0,0 @@ -# AI Agent Log: A - -**Session:** session_20260109_002315 -**Started:** 2026-01-09 00:23:15 -**Model:** gemini-2.0-flash - ---- - - -## Request #1 - šŸŽÆ ACTIVE TURN - -**Time:** 00:23:17 - -### What Happened -• Game e22d9a99-f253-4ddd-9198-17f9d42b8132 has started with 2 players! -• Game e22d9a99-f253-4ddd-9198-17f9d42b8132 has started with 2 players! -• Turn 0: Player 0's turn begins. -• Turn 0: Player 0's turn begins. - -### Prompt Sent -See: [prompt_1.json](prompts/prompt_1.json) - -### Response Failed āŒ - -**Error:** Unknown error -**Latency:** 19.72s - ---- diff --git a/examples/ai_testing/my_games/session_20260109_002315/A/prompts/prompt_1.json b/examples/ai_testing/my_games/session_20260109_002315/A/prompts/prompt_1.json deleted file mode 100644 index b558973bcccea91899133935c753883d74301cdd..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_002315/A/prompts/prompt_1.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "request_number": 1, - "timestamp": "2026-01-09T00:23:17.696789", - "player_name": "A", - "is_active_turn": true, - "prompt": { - "meta_data": { - "agent_name": "A", - "role": null - }, - "task_context": { - "what_just_happened": "• Game e22d9a99-f253-4ddd-9198-17f9d42b8132 has started with 2 players!\n• Game e22d9a99-f253-4ddd-9198-17f9d42b8132 has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." - }, - "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"game_id\":\"e22d9a99-f253-4ddd-9198-17f9d42b8132\",\"turn_number\":0,\"current_player\":0,\"game_phase\":\"SETUP_FIRST_ROUND\",\"turn_phase\":\"ROLL_DICE\",\"dice_rolled\":null,\"allowed_actions\":[\"PLACE_STARTING_SETTLEMENT\"],\"board_state\":{\"tiles\":[{\"id\":1,\"position\":[0,0],\"axial_coords\":[0,-2],\"type\":\"forest\",\"token\":12,\"has_robber\":false},{\"id\":2,\"position\":[0,1],\"axial_coords\":[1,-2],\"type\":\"pasture\",\"token\":5,\"has_robber\":false},{\"id\":3,\"position\":[0,2],\"axial_coords\":[2,-2],\"type\":\"forest\",\"token\":4,\"has_robber\":false},{\"id\":4,\"position\":[1,0],\"axial_coords\":[-1,-1],\"type\":\"pasture\",\"token\":8,\"has_robber\":false},{\"id\":5,\"position\":[1,1],\"axial_coords\":[0,-1],\"type\":\"hills\",\"token\":6,\"has_robber\":false},{\"id\":6,\"position\":[1,2],\"axial_coords\":[1,-1],\"type\":\"forest\",\"token\":3,\"has_robber\":false},{\"id\":7,\"position\":[1,3],\"axial_coords\":[2,-1],\"type\":\"fields\",\"token\":8,\"has_robber\":false},{\"id\":8,\"position\":[2,0],\"axial_coords\":[-2,0],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":9,\"position\":[2,1],\"axial_coords\":[-1,0],\"type\":\"forest\",\"token\":11,\"has_robber\":false},{\"id\":10,\"position\":[2,2],\"axial_coords\":[0,0],\"type\":\"desert\",\"token\":null,\"has_robber\":true},{\"id\":11,\"position\":[2,3],\"axial_coords\":[1,0],\"type\":\"mountains\",\"token\":3,\"has_robber\":false},{\"id\":12,\"position\":[2,4],\"axial_coords\":[2,0],\"type\":\"pasture\",\"token\":4,\"has_robber\":false},{\"id\":13,\"position\":[3,0],\"axial_coords\":[-2,1],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":14,\"position\":[3,1],\"axial_coords\":[-1,1],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":15,\"position\":[3,2],\"axial_coords\":[0,1],\"type\":\"fields\",\"token\":6,\"has_robber\":false},{\"id\":16,\"position\":[3,3],\"axial_coords\":[1,1],\"type\":\"pasture\",\"token\":11,\"has_robber\":false},{\"id\":17,\"position\":[4,0],\"axial_coords\":[-2,2],\"type\":\"mountains\",\"token\":5,\"has_robber\":false},{\"id\":18,\"position\":[4,1],\"axial_coords\":[-1,2],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":19,\"position\":[4,2],\"axial_coords\":[0,2],\"type\":\"mountains\",\"token\":2,\"has_robber\":false}],\"robber_position\":[2,2]},\"players_state\":[{\"player_id\":0,\"name\":\"A\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0},{\"player_id\":1,\"name\":\"B\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0}]}", - "constraints": { - "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] - } - }, - "response_schema": { - "type": "object", - "required": [ - "internal_thinking", - "action" - ], - "properties": { - "internal_thinking": { - "type": "string", - "description": "Private strategy. What's your plan and why?", - "minLength": 1000 - }, - "note_to_self": { - "type": "string", - "description": "Important facts for when it's your turn. Use only if essential for clarity or direct user query. Omit otherwise.", - "maxLength": 100 - }, - "say_outloud": { - "type": "string", - "description": "A short message to other players (max 100 chars). Use for negotiation, threats, or table talk. Keep in mind you pay for speak outload.", - "maxLength": 100 - }, - "action": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "The action type (must match one from allowed_actions in constraints)" - }, - "parameters": { - "type": "string", - "description": "Action parameters as JSON string. Example: {\"node\": 14} or {} if no parameters needed" - } - }, - "propertyOrdering": [ - "type", - "parameters" - ] - } - }, - "propertyOrdering": [ - "internal_thinking", - "note_to_self", - "say_outloud", - "action" - ] - }, - "what_happened": "• Game e22d9a99-f253-4ddd-9198-17f9d42b8132 has started with 2 players!\n• Game e22d9a99-f253-4ddd-9198-17f9d42b8132 has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_002315/A/prompts/prompt_1.txt b/examples/ai_testing/my_games/session_20260109_002315/A/prompts/prompt_1.txt deleted file mode 100644 index 865bb20d465ef2250251c1579f707e97d4ac253a..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_002315/A/prompts/prompt_1.txt +++ /dev/null @@ -1,89 +0,0 @@ -=== Prompt #1 for A === -Timestamp: 2026-01-09T00:23:17.697523 -Active Turn: True - ---- What Happened --- -• Game e22d9a99-f253-4ddd-9198-17f9d42b8132 has started with 2 players! -• Game e22d9a99-f253-4ddd-9198-17f9d42b8132 has started with 2 players! -• Turn 0: Player 0's turn begins. -• Turn 0: Player 0's turn begins. - ---- Response Schema --- -{ - "type": "object", - "required": [ - "internal_thinking", - "action" - ], - "properties": { - "internal_thinking": { - "type": "string", - "description": "Private strategy. What's your plan and why?", - "minLength": 1000 - }, - "note_to_self": { - "type": "string", - "description": "Important facts for when it's your turn. Use only if essential for clarity or direct user query. Omit otherwise.", - "maxLength": 100 - }, - "say_outloud": { - "type": "string", - "description": "A short message to other players (max 100 chars). Use for negotiation, threats, or table talk. Keep in mind you pay for speak outload.", - "maxLength": 100 - }, - "action": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "The action type (must match one from allowed_actions in constraints)" - }, - "parameters": { - "type": "string", - "description": "Action parameters as JSON string. Example: {\"node\": 14} or {} if no parameters needed" - } - }, - "propertyOrdering": [ - "type", - "parameters" - ] - } - }, - "propertyOrdering": [ - "internal_thinking", - "note_to_self", - "say_outloud", - "action" - ] -} - ---- Prompt Content --- -{ - "meta_data": { - "agent_name": "A", - "role": null - }, - "task_context": { - "what_just_happened": "• Game e22d9a99-f253-4ddd-9198-17f9d42b8132 has started with 2 players!\n• Game e22d9a99-f253-4ddd-9198-17f9d42b8132 has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." - }, - "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"game_id\":\"e22d9a99-f253-4ddd-9198-17f9d42b8132\",\"turn_number\":0,\"current_player\":0,\"game_phase\":\"SETUP_FIRST_ROUND\",\"turn_phase\":\"ROLL_DICE\",\"dice_rolled\":null,\"allowed_actions\":[\"PLACE_STARTING_SETTLEMENT\"],\"board_state\":{\"tiles\":[{\"id\":1,\"position\":[0,0],\"axial_coords\":[0,-2],\"type\":\"forest\",\"token\":12,\"has_robber\":false},{\"id\":2,\"position\":[0,1],\"axial_coords\":[1,-2],\"type\":\"pasture\",\"token\":5,\"has_robber\":false},{\"id\":3,\"position\":[0,2],\"axial_coords\":[2,-2],\"type\":\"forest\",\"token\":4,\"has_robber\":false},{\"id\":4,\"position\":[1,0],\"axial_coords\":[-1,-1],\"type\":\"pasture\",\"token\":8,\"has_robber\":false},{\"id\":5,\"position\":[1,1],\"axial_coords\":[0,-1],\"type\":\"hills\",\"token\":6,\"has_robber\":false},{\"id\":6,\"position\":[1,2],\"axial_coords\":[1,-1],\"type\":\"forest\",\"token\":3,\"has_robber\":false},{\"id\":7,\"position\":[1,3],\"axial_coords\":[2,-1],\"type\":\"fields\",\"token\":8,\"has_robber\":false},{\"id\":8,\"position\":[2,0],\"axial_coords\":[-2,0],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":9,\"position\":[2,1],\"axial_coords\":[-1,0],\"type\":\"forest\",\"token\":11,\"has_robber\":false},{\"id\":10,\"position\":[2,2],\"axial_coords\":[0,0],\"type\":\"desert\",\"token\":null,\"has_robber\":true},{\"id\":11,\"position\":[2,3],\"axial_coords\":[1,0],\"type\":\"mountains\",\"token\":3,\"has_robber\":false},{\"id\":12,\"position\":[2,4],\"axial_coords\":[2,0],\"type\":\"pasture\",\"token\":4,\"has_robber\":false},{\"id\":13,\"position\":[3,0],\"axial_coords\":[-2,1],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":14,\"position\":[3,1],\"axial_coords\":[-1,1],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":15,\"position\":[3,2],\"axial_coords\":[0,1],\"type\":\"fields\",\"token\":6,\"has_robber\":false},{\"id\":16,\"position\":[3,3],\"axial_coords\":[1,1],\"type\":\"pasture\",\"token\":11,\"has_robber\":false},{\"id\":17,\"position\":[4,0],\"axial_coords\":[-2,2],\"type\":\"mountains\",\"token\":5,\"has_robber\":false},{\"id\":18,\"position\":[4,1],\"axial_coords\":[-1,2],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":19,\"position\":[4,2],\"axial_coords\":[0,2],\"type\":\"mountains\",\"token\":2,\"has_robber\":false}],\"robber_position\":[2,2]},\"players_state\":[{\"player_id\":0,\"name\":\"A\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0},{\"player_id\":1,\"name\":\"B\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0}]}", - "constraints": { - "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] - } -} diff --git a/examples/ai_testing/my_games/session_20260109_002315/A/responses/response_1.json b/examples/ai_testing/my_games/session_20260109_002315/A/responses/response_1.json deleted file mode 100644 index 521d134d5115b1255ea8dfc0add20f460006f877..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_002315/A/responses/response_1.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "request_number": 1, - "timestamp": "2026-01-09T00:23:38.815389", - "player_name": "A", - "success": true, - "raw_content": "{\"internal_thinking\": \"The game is in the first setup round, and I need to place my starting settlement. I must choose a node that offers a good combination of resources with high probability numbers. My strategy is to prioritize diverse resources (Wood, Brick, Sheep, Wheat, Ore) and high-probability tokens (6, 8, 5, 9). I will avoid placing near the desert hex (Hex 10). I will identify potential nodes by grouping adjacent hexes with favorable attributes. The combination of Hex 4 (S8), Hex 5 (B6), and Hex 9 (W11) provides Sheep, Brick, and Wood with probabilities 8, 6, and 11", - "parsed": null, - "model": "gemini-2.5-flash", - "tokens": { - "prompt": 1693, - "completion": 149, - "total": 5772 - }, - "latency_seconds": 19.721049070358276, - "error": null -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_002315/session_metadata.json b/examples/ai_testing/my_games/session_20260109_002315/session_metadata.json deleted file mode 100644 index be509f6cf72b726000174d8908328f48ebeef5dd..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_002315/session_metadata.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "session_id": "session_20260109_002315", - "start_time": "2026-01-09T00:23:15.644145", - "version": "2.0" -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_002646/A/A.md b/examples/ai_testing/my_games/session_20260109_002646/A/A.md deleted file mode 100644 index 73984830e77d9486858f07f29b49602ff289d9fa..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_002646/A/A.md +++ /dev/null @@ -1,28 +0,0 @@ -# AI Agent Log: A - -**Session:** session_20260109_002646 -**Started:** 2026-01-09 00:26:46 -**Model:** gemini-2.0-flash - ---- - - -## Request #1 - šŸŽÆ ACTIVE TURN - -**Time:** 00:26:48 - -### What Happened -• Game ccc3296f-05cc-4ae0-9c46-b0fa861e1212 has started with 2 players! -• Game ccc3296f-05cc-4ae0-9c46-b0fa861e1212 has started with 2 players! -• Turn 0: Player 0's turn begins. -• Turn 0: Player 0's turn begins. - -### Prompt Sent -See: [prompt_1.json](prompts/prompt_1.json) - -### Response Failed āŒ - -**Error:** Unknown error -**Latency:** 21.17s - ---- diff --git a/examples/ai_testing/my_games/session_20260109_002646/A/prompts/prompt_1.json b/examples/ai_testing/my_games/session_20260109_002646/A/prompts/prompt_1.json deleted file mode 100644 index b4a698dc19cd211b681d6115dd0d0847b9d70ae6..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_002646/A/prompts/prompt_1.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "request_number": 1, - "timestamp": "2026-01-09T00:26:48.615159", - "player_name": "A", - "is_active_turn": true, - "prompt": { - "meta_data": { - "agent_name": "A", - "role": null - }, - "task_context": { - "what_just_happened": "• Game ccc3296f-05cc-4ae0-9c46-b0fa861e1212 has started with 2 players!\n• Game ccc3296f-05cc-4ae0-9c46-b0fa861e1212 has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." - }, - "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"game_id\":\"ccc3296f-05cc-4ae0-9c46-b0fa861e1212\",\"turn_number\":0,\"current_player\":0,\"game_phase\":\"SETUP_FIRST_ROUND\",\"turn_phase\":\"ROLL_DICE\",\"dice_rolled\":null,\"allowed_actions\":[\"PLACE_STARTING_SETTLEMENT\"],\"board_state\":{\"tiles\":[{\"id\":1,\"position\":[0,0],\"axial_coords\":[0,-2],\"type\":\"forest\",\"token\":12,\"has_robber\":false},{\"id\":2,\"position\":[0,1],\"axial_coords\":[1,-2],\"type\":\"pasture\",\"token\":5,\"has_robber\":false},{\"id\":3,\"position\":[0,2],\"axial_coords\":[2,-2],\"type\":\"forest\",\"token\":4,\"has_robber\":false},{\"id\":4,\"position\":[1,0],\"axial_coords\":[-1,-1],\"type\":\"pasture\",\"token\":8,\"has_robber\":false},{\"id\":5,\"position\":[1,1],\"axial_coords\":[0,-1],\"type\":\"hills\",\"token\":6,\"has_robber\":false},{\"id\":6,\"position\":[1,2],\"axial_coords\":[1,-1],\"type\":\"forest\",\"token\":3,\"has_robber\":false},{\"id\":7,\"position\":[1,3],\"axial_coords\":[2,-1],\"type\":\"fields\",\"token\":8,\"has_robber\":false},{\"id\":8,\"position\":[2,0],\"axial_coords\":[-2,0],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":9,\"position\":[2,1],\"axial_coords\":[-1,0],\"type\":\"forest\",\"token\":11,\"has_robber\":false},{\"id\":10,\"position\":[2,2],\"axial_coords\":[0,0],\"type\":\"desert\",\"token\":null,\"has_robber\":true},{\"id\":11,\"position\":[2,3],\"axial_coords\":[1,0],\"type\":\"mountains\",\"token\":3,\"has_robber\":false},{\"id\":12,\"position\":[2,4],\"axial_coords\":[2,0],\"type\":\"pasture\",\"token\":4,\"has_robber\":false},{\"id\":13,\"position\":[3,0],\"axial_coords\":[-2,1],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":14,\"position\":[3,1],\"axial_coords\":[-1,1],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":15,\"position\":[3,2],\"axial_coords\":[0,1],\"type\":\"fields\",\"token\":6,\"has_robber\":false},{\"id\":16,\"position\":[3,3],\"axial_coords\":[1,1],\"type\":\"pasture\",\"token\":11,\"has_robber\":false},{\"id\":17,\"position\":[4,0],\"axial_coords\":[-2,2],\"type\":\"mountains\",\"token\":5,\"has_robber\":false},{\"id\":18,\"position\":[4,1],\"axial_coords\":[-1,2],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":19,\"position\":[4,2],\"axial_coords\":[0,2],\"type\":\"mountains\",\"token\":2,\"has_robber\":false}],\"robber_position\":[2,2]},\"players_state\":[{\"player_id\":0,\"name\":\"A\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0},{\"player_id\":1,\"name\":\"B\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0}]}", - "constraints": { - "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] - } - }, - "response_schema": { - "type": "object", - "required": [ - "internal_thinking", - "action" - ], - "properties": { - "internal_thinking": { - "type": "string", - "description": "Private strategy. What's your plan and why? Be thorough and detailed (aim for several paragraphs)." - }, - "note_to_self": { - "type": "string", - "description": "Important facts for when it's your turn. Use only if essential for clarity or direct user query. Omit otherwise." - }, - "say_outloud": { - "type": "string", - "description": "A short message to other players (max 100 chars). Use for negotiation, threats, or table talk. Keep in mind you pay for speak outload." - }, - "action": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "The action type (must match one from allowed_actions in constraints)" - }, - "parameters": { - "type": "string", - "description": "Action parameters as JSON string. Example: {\"node\": 14} or {} if no parameters needed" - } - }, - "propertyOrdering": [ - "type", - "parameters" - ] - } - }, - "propertyOrdering": [ - "internal_thinking", - "note_to_self", - "say_outloud", - "action" - ] - }, - "what_happened": "• Game ccc3296f-05cc-4ae0-9c46-b0fa861e1212 has started with 2 players!\n• Game ccc3296f-05cc-4ae0-9c46-b0fa861e1212 has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_002646/A/prompts/prompt_1.txt b/examples/ai_testing/my_games/session_20260109_002646/A/prompts/prompt_1.txt deleted file mode 100644 index d79d34aa9ebda14d5f1bff38cb563636f8458747..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_002646/A/prompts/prompt_1.txt +++ /dev/null @@ -1,86 +0,0 @@ -=== Prompt #1 for A === -Timestamp: 2026-01-09T00:26:48.616488 -Active Turn: True - ---- What Happened --- -• Game ccc3296f-05cc-4ae0-9c46-b0fa861e1212 has started with 2 players! -• Game ccc3296f-05cc-4ae0-9c46-b0fa861e1212 has started with 2 players! -• Turn 0: Player 0's turn begins. -• Turn 0: Player 0's turn begins. - ---- Response Schema --- -{ - "type": "object", - "required": [ - "internal_thinking", - "action" - ], - "properties": { - "internal_thinking": { - "type": "string", - "description": "Private strategy. What's your plan and why? Be thorough and detailed (aim for several paragraphs)." - }, - "note_to_self": { - "type": "string", - "description": "Important facts for when it's your turn. Use only if essential for clarity or direct user query. Omit otherwise." - }, - "say_outloud": { - "type": "string", - "description": "A short message to other players (max 100 chars). Use for negotiation, threats, or table talk. Keep in mind you pay for speak outload." - }, - "action": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "The action type (must match one from allowed_actions in constraints)" - }, - "parameters": { - "type": "string", - "description": "Action parameters as JSON string. Example: {\"node\": 14} or {} if no parameters needed" - } - }, - "propertyOrdering": [ - "type", - "parameters" - ] - } - }, - "propertyOrdering": [ - "internal_thinking", - "note_to_self", - "say_outloud", - "action" - ] -} - ---- Prompt Content --- -{ - "meta_data": { - "agent_name": "A", - "role": null - }, - "task_context": { - "what_just_happened": "• Game ccc3296f-05cc-4ae0-9c46-b0fa861e1212 has started with 2 players!\n• Game ccc3296f-05cc-4ae0-9c46-b0fa861e1212 has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." - }, - "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"game_id\":\"ccc3296f-05cc-4ae0-9c46-b0fa861e1212\",\"turn_number\":0,\"current_player\":0,\"game_phase\":\"SETUP_FIRST_ROUND\",\"turn_phase\":\"ROLL_DICE\",\"dice_rolled\":null,\"allowed_actions\":[\"PLACE_STARTING_SETTLEMENT\"],\"board_state\":{\"tiles\":[{\"id\":1,\"position\":[0,0],\"axial_coords\":[0,-2],\"type\":\"forest\",\"token\":12,\"has_robber\":false},{\"id\":2,\"position\":[0,1],\"axial_coords\":[1,-2],\"type\":\"pasture\",\"token\":5,\"has_robber\":false},{\"id\":3,\"position\":[0,2],\"axial_coords\":[2,-2],\"type\":\"forest\",\"token\":4,\"has_robber\":false},{\"id\":4,\"position\":[1,0],\"axial_coords\":[-1,-1],\"type\":\"pasture\",\"token\":8,\"has_robber\":false},{\"id\":5,\"position\":[1,1],\"axial_coords\":[0,-1],\"type\":\"hills\",\"token\":6,\"has_robber\":false},{\"id\":6,\"position\":[1,2],\"axial_coords\":[1,-1],\"type\":\"forest\",\"token\":3,\"has_robber\":false},{\"id\":7,\"position\":[1,3],\"axial_coords\":[2,-1],\"type\":\"fields\",\"token\":8,\"has_robber\":false},{\"id\":8,\"position\":[2,0],\"axial_coords\":[-2,0],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":9,\"position\":[2,1],\"axial_coords\":[-1,0],\"type\":\"forest\",\"token\":11,\"has_robber\":false},{\"id\":10,\"position\":[2,2],\"axial_coords\":[0,0],\"type\":\"desert\",\"token\":null,\"has_robber\":true},{\"id\":11,\"position\":[2,3],\"axial_coords\":[1,0],\"type\":\"mountains\",\"token\":3,\"has_robber\":false},{\"id\":12,\"position\":[2,4],\"axial_coords\":[2,0],\"type\":\"pasture\",\"token\":4,\"has_robber\":false},{\"id\":13,\"position\":[3,0],\"axial_coords\":[-2,1],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":14,\"position\":[3,1],\"axial_coords\":[-1,1],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":15,\"position\":[3,2],\"axial_coords\":[0,1],\"type\":\"fields\",\"token\":6,\"has_robber\":false},{\"id\":16,\"position\":[3,3],\"axial_coords\":[1,1],\"type\":\"pasture\",\"token\":11,\"has_robber\":false},{\"id\":17,\"position\":[4,0],\"axial_coords\":[-2,2],\"type\":\"mountains\",\"token\":5,\"has_robber\":false},{\"id\":18,\"position\":[4,1],\"axial_coords\":[-1,2],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":19,\"position\":[4,2],\"axial_coords\":[0,2],\"type\":\"mountains\",\"token\":2,\"has_robber\":false}],\"robber_position\":[2,2]},\"players_state\":[{\"player_id\":0,\"name\":\"A\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0},{\"player_id\":1,\"name\":\"B\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0}]}", - "constraints": { - "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] - } -} diff --git a/examples/ai_testing/my_games/session_20260109_002646/A/responses/response_1.json b/examples/ai_testing/my_games/session_20260109_002646/A/responses/response_1.json deleted file mode 100644 index 79993ffe038e5e14398d58365027e0671b1bb849..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_002646/A/responses/response_1.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "request_number": 1, - "timestamp": "2026-01-09T00:27:11.235052", - "player_name": "A", - "success": true, - "raw_content": "{\"internal_thinking\": \"The game has just started, and it's my turn (Player 0) in the `SETUP_FIRST_ROUND` phase. My only allowed action is `PLACE_STARTING_SETTLEMENT`. The goal is to select the optimal node for my first settlement to maximize resource production and diversity, prioritizing high-probability dice rolls (6, 8, 5, 9).\\n\\nI need to analyze the board to identify nodes that connect to valuable hexes. Since the `N` (Nodes) lookup table is not explicitly provided in the game state, I must infer node connections based on the hexes' axial coordinates and standard Catan board geometry. I will look for intersections of three hexes", - "parsed": null, - "model": "gemini-2.5-flash", - "tokens": { - "prompt": 1686, - "completion": 153, - "total": 5767 - }, - "latency_seconds": 21.169161081314087, - "error": null -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_002646/session_metadata.json b/examples/ai_testing/my_games/session_20260109_002646/session_metadata.json deleted file mode 100644 index 0ad090d9390191fd332b2488937bf599c0afdfca..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_002646/session_metadata.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "session_id": "session_20260109_002646", - "start_time": "2026-01-09T00:26:46.560789", - "version": "2.0" -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_003142/A/A.md b/examples/ai_testing/my_games/session_20260109_003142/A/A.md deleted file mode 100644 index 68de050819b3f2a4bea5047711cb2599ffb18edd..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_003142/A/A.md +++ /dev/null @@ -1,28 +0,0 @@ -# AI Agent Log: A - -**Session:** session_20260109_003142 -**Started:** 2026-01-09 00:31:42 -**Model:** gemini-2.0-flash - ---- - - -## Request #1 - šŸŽÆ ACTIVE TURN - -**Time:** 00:31:44 - -### What Happened -• Game 114a80bb-2558-43ec-9481-10c44a657a29 has started with 2 players! -• Game 114a80bb-2558-43ec-9481-10c44a657a29 has started with 2 players! -• Turn 0: Player 0's turn begins. -• Turn 0: Player 0's turn begins. - -### Prompt Sent -See: [prompt_1.json](prompts/prompt_1.json) - -### Response Failed āŒ - -**Error:** Unknown error -**Latency:** 18.62s - ---- diff --git a/examples/ai_testing/my_games/session_20260109_003142/A/prompts/prompt_1.json b/examples/ai_testing/my_games/session_20260109_003142/A/prompts/prompt_1.json deleted file mode 100644 index 0ece5891ef45f49633de3913afc528725222994c..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_003142/A/prompts/prompt_1.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "request_number": 1, - "timestamp": "2026-01-09T00:31:44.876592", - "player_name": "A", - "is_active_turn": true, - "prompt": { - "meta_data": { - "agent_name": "A", - "role": null - }, - "task_context": { - "what_just_happened": "• Game 114a80bb-2558-43ec-9481-10c44a657a29 has started with 2 players!\n• Game 114a80bb-2558-43ec-9481-10c44a657a29 has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." - }, - "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"game_id\":\"114a80bb-2558-43ec-9481-10c44a657a29\",\"turn_number\":0,\"current_player\":0,\"game_phase\":\"SETUP_FIRST_ROUND\",\"turn_phase\":\"ROLL_DICE\",\"dice_rolled\":null,\"allowed_actions\":[\"PLACE_STARTING_SETTLEMENT\"],\"board_state\":{\"tiles\":[{\"id\":1,\"position\":[0,0],\"axial_coords\":[0,-2],\"type\":\"forest\",\"token\":12,\"has_robber\":false},{\"id\":2,\"position\":[0,1],\"axial_coords\":[1,-2],\"type\":\"pasture\",\"token\":5,\"has_robber\":false},{\"id\":3,\"position\":[0,2],\"axial_coords\":[2,-2],\"type\":\"forest\",\"token\":4,\"has_robber\":false},{\"id\":4,\"position\":[1,0],\"axial_coords\":[-1,-1],\"type\":\"pasture\",\"token\":8,\"has_robber\":false},{\"id\":5,\"position\":[1,1],\"axial_coords\":[0,-1],\"type\":\"hills\",\"token\":6,\"has_robber\":false},{\"id\":6,\"position\":[1,2],\"axial_coords\":[1,-1],\"type\":\"forest\",\"token\":3,\"has_robber\":false},{\"id\":7,\"position\":[1,3],\"axial_coords\":[2,-1],\"type\":\"fields\",\"token\":8,\"has_robber\":false},{\"id\":8,\"position\":[2,0],\"axial_coords\":[-2,0],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":9,\"position\":[2,1],\"axial_coords\":[-1,0],\"type\":\"forest\",\"token\":11,\"has_robber\":false},{\"id\":10,\"position\":[2,2],\"axial_coords\":[0,0],\"type\":\"desert\",\"token\":null,\"has_robber\":true},{\"id\":11,\"position\":[2,3],\"axial_coords\":[1,0],\"type\":\"mountains\",\"token\":3,\"has_robber\":false},{\"id\":12,\"position\":[2,4],\"axial_coords\":[2,0],\"type\":\"pasture\",\"token\":4,\"has_robber\":false},{\"id\":13,\"position\":[3,0],\"axial_coords\":[-2,1],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":14,\"position\":[3,1],\"axial_coords\":[-1,1],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":15,\"position\":[3,2],\"axial_coords\":[0,1],\"type\":\"fields\",\"token\":6,\"has_robber\":false},{\"id\":16,\"position\":[3,3],\"axial_coords\":[1,1],\"type\":\"pasture\",\"token\":11,\"has_robber\":false},{\"id\":17,\"position\":[4,0],\"axial_coords\":[-2,2],\"type\":\"mountains\",\"token\":5,\"has_robber\":false},{\"id\":18,\"position\":[4,1],\"axial_coords\":[-1,2],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":19,\"position\":[4,2],\"axial_coords\":[0,2],\"type\":\"mountains\",\"token\":2,\"has_robber\":false}],\"robber_position\":[2,2]},\"players_state\":[{\"player_id\":0,\"name\":\"A\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0},{\"player_id\":1,\"name\":\"B\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0}]}", - "constraints": { - "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] - } - }, - "response_schema": { - "type": "object", - "required": [ - "internal_thinking", - "action" - ], - "properties": { - "internal_thinking": { - "type": "string", - "description": "Private strategy. What's your plan and why? Be thorough and detailed (aim for several paragraphs)." - }, - "note_to_self": { - "type": "string", - "description": "Important facts for when it's your turn. Use only if essential for clarity or direct user query. Omit otherwise." - }, - "say_outloud": { - "type": "string", - "description": "A short message to other players (max 100 chars). Use for negotiation, threats, or table talk. Keep in mind you pay for speak outload." - }, - "action": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "The action type (must match one from allowed_actions in constraints)" - }, - "parameters": { - "type": "string", - "description": "Action parameters as JSON string. Example: {\"node\": 14} or {} if no parameters needed" - } - }, - "propertyOrdering": [ - "type", - "parameters" - ] - } - }, - "propertyOrdering": [ - "internal_thinking", - "note_to_self", - "say_outloud", - "action" - ] - }, - "what_happened": "• Game 114a80bb-2558-43ec-9481-10c44a657a29 has started with 2 players!\n• Game 114a80bb-2558-43ec-9481-10c44a657a29 has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_003142/A/prompts/prompt_1.txt b/examples/ai_testing/my_games/session_20260109_003142/A/prompts/prompt_1.txt deleted file mode 100644 index ebaf2fe05ccd0b957068864f9e708b3066ad2270..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_003142/A/prompts/prompt_1.txt +++ /dev/null @@ -1,86 +0,0 @@ -=== Prompt #1 for A === -Timestamp: 2026-01-09T00:31:44.877381 -Active Turn: True - ---- What Happened --- -• Game 114a80bb-2558-43ec-9481-10c44a657a29 has started with 2 players! -• Game 114a80bb-2558-43ec-9481-10c44a657a29 has started with 2 players! -• Turn 0: Player 0's turn begins. -• Turn 0: Player 0's turn begins. - ---- Response Schema --- -{ - "type": "object", - "required": [ - "internal_thinking", - "action" - ], - "properties": { - "internal_thinking": { - "type": "string", - "description": "Private strategy. What's your plan and why? Be thorough and detailed (aim for several paragraphs)." - }, - "note_to_self": { - "type": "string", - "description": "Important facts for when it's your turn. Use only if essential for clarity or direct user query. Omit otherwise." - }, - "say_outloud": { - "type": "string", - "description": "A short message to other players (max 100 chars). Use for negotiation, threats, or table talk. Keep in mind you pay for speak outload." - }, - "action": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "The action type (must match one from allowed_actions in constraints)" - }, - "parameters": { - "type": "string", - "description": "Action parameters as JSON string. Example: {\"node\": 14} or {} if no parameters needed" - } - }, - "propertyOrdering": [ - "type", - "parameters" - ] - } - }, - "propertyOrdering": [ - "internal_thinking", - "note_to_self", - "say_outloud", - "action" - ] -} - ---- Prompt Content --- -{ - "meta_data": { - "agent_name": "A", - "role": null - }, - "task_context": { - "what_just_happened": "• Game 114a80bb-2558-43ec-9481-10c44a657a29 has started with 2 players!\n• Game 114a80bb-2558-43ec-9481-10c44a657a29 has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." - }, - "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"game_id\":\"114a80bb-2558-43ec-9481-10c44a657a29\",\"turn_number\":0,\"current_player\":0,\"game_phase\":\"SETUP_FIRST_ROUND\",\"turn_phase\":\"ROLL_DICE\",\"dice_rolled\":null,\"allowed_actions\":[\"PLACE_STARTING_SETTLEMENT\"],\"board_state\":{\"tiles\":[{\"id\":1,\"position\":[0,0],\"axial_coords\":[0,-2],\"type\":\"forest\",\"token\":12,\"has_robber\":false},{\"id\":2,\"position\":[0,1],\"axial_coords\":[1,-2],\"type\":\"pasture\",\"token\":5,\"has_robber\":false},{\"id\":3,\"position\":[0,2],\"axial_coords\":[2,-2],\"type\":\"forest\",\"token\":4,\"has_robber\":false},{\"id\":4,\"position\":[1,0],\"axial_coords\":[-1,-1],\"type\":\"pasture\",\"token\":8,\"has_robber\":false},{\"id\":5,\"position\":[1,1],\"axial_coords\":[0,-1],\"type\":\"hills\",\"token\":6,\"has_robber\":false},{\"id\":6,\"position\":[1,2],\"axial_coords\":[1,-1],\"type\":\"forest\",\"token\":3,\"has_robber\":false},{\"id\":7,\"position\":[1,3],\"axial_coords\":[2,-1],\"type\":\"fields\",\"token\":8,\"has_robber\":false},{\"id\":8,\"position\":[2,0],\"axial_coords\":[-2,0],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":9,\"position\":[2,1],\"axial_coords\":[-1,0],\"type\":\"forest\",\"token\":11,\"has_robber\":false},{\"id\":10,\"position\":[2,2],\"axial_coords\":[0,0],\"type\":\"desert\",\"token\":null,\"has_robber\":true},{\"id\":11,\"position\":[2,3],\"axial_coords\":[1,0],\"type\":\"mountains\",\"token\":3,\"has_robber\":false},{\"id\":12,\"position\":[2,4],\"axial_coords\":[2,0],\"type\":\"pasture\",\"token\":4,\"has_robber\":false},{\"id\":13,\"position\":[3,0],\"axial_coords\":[-2,1],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":14,\"position\":[3,1],\"axial_coords\":[-1,1],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":15,\"position\":[3,2],\"axial_coords\":[0,1],\"type\":\"fields\",\"token\":6,\"has_robber\":false},{\"id\":16,\"position\":[3,3],\"axial_coords\":[1,1],\"type\":\"pasture\",\"token\":11,\"has_robber\":false},{\"id\":17,\"position\":[4,0],\"axial_coords\":[-2,2],\"type\":\"mountains\",\"token\":5,\"has_robber\":false},{\"id\":18,\"position\":[4,1],\"axial_coords\":[-1,2],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":19,\"position\":[4,2],\"axial_coords\":[0,2],\"type\":\"mountains\",\"token\":2,\"has_robber\":false}],\"robber_position\":[2,2]},\"players_state\":[{\"player_id\":0,\"name\":\"A\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0},{\"player_id\":1,\"name\":\"B\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0}]}", - "constraints": { - "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] - } -} diff --git a/examples/ai_testing/my_games/session_20260109_003142/A/responses/response_1.json b/examples/ai_testing/my_games/session_20260109_003142/A/responses/response_1.json deleted file mode 100644 index ede2b8a7872a604e4ed71a8e8c138fce4dbd1595..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_003142/A/responses/response_1.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "request_number": 1, - "timestamp": "2026-01-09T00:32:05.048373", - "player_name": "A", - "success": true, - "raw_content": "{\"internal_thinking\": \"The game is in the `SETUP_FIRST_ROUND` phase, and as Player 0, I need to place my first settlement. The `allowed_actions` only includes `place_starting_settlement`, so I must choose a node. My strategy for the first settlement is to prioritize a good mix of basic resources (Wood, Brick, Sheep, Wheat, Ore) and high-probability production numbers (6, 8, 5, 9). I want to avoid low-probability numbers (2, 3, 11, 12) if possible, and definitely avoid the desert. I will analyze the board state to identify the best node.\\n\\nFirst, I'll", - "parsed": null, - "model": "gemini-2.5-flash", - "tokens": { - "prompt": 1695, - "completion": 152, - "total": 5776 - }, - "latency_seconds": 18.62328004837036, - "error": null -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_003142/session_metadata.json b/examples/ai_testing/my_games/session_20260109_003142/session_metadata.json deleted file mode 100644 index ac27ec996899e07b2d6b36c01393a48ba51625ce..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_003142/session_metadata.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "session_id": "session_20260109_003142", - "start_time": "2026-01-09T00:31:42.807451", - "version": "2.0" -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_003424/A/A.md b/examples/ai_testing/my_games/session_20260109_003424/A/A.md deleted file mode 100644 index 6cb4d4c232c9a160037c31253811476bccc6fac6..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_003424/A/A.md +++ /dev/null @@ -1,29 +0,0 @@ -# AI Agent Log: A - -**Session:** session_20260109_003424 -**Started:** 2026-01-09 00:34:24 -**Model:** gemini-2.0-flash - ---- - - -## Request #1 - šŸŽÆ ACTIVE TURN - -**Time:** 00:34:26 - -### What Happened -• Game 6a5ecef0-ece7-4e68-9e3e-889d5c2529b2 has started with 2 players! -• Game 6a5ecef0-ece7-4e68-9e3e-889d5c2529b2 has started with 2 players! -• Turn 0: Player 0's turn begins. -• Turn 0: Player 0's turn begins. - -### Prompt Sent -See: [prompt_1.json](prompts/prompt_1.json) - -### Response Received āœ… - -**Latency:** 24.12s | **Tokens:** 6751 - -**Thinking:** My objective is to place the first settlement on a node that provides a strong, diverse set of resources with high probability. I began by analyzing the `board_state.tiles` to identify hexes with favo... - ---- diff --git a/examples/ai_testing/my_games/session_20260109_003424/A/prompts/prompt_1.json b/examples/ai_testing/my_games/session_20260109_003424/A/prompts/prompt_1.json deleted file mode 100644 index 5319e539350d263d4cd1b32f2385b5d5ad1a668a..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_003424/A/prompts/prompt_1.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "request_number": 1, - "timestamp": "2026-01-09T00:34:26.971359", - "player_name": "A", - "is_active_turn": true, - "prompt": { - "meta_data": { - "agent_name": "A", - "role": null - }, - "task_context": { - "what_just_happened": "• Game 6a5ecef0-ece7-4e68-9e3e-889d5c2529b2 has started with 2 players!\n• Game 6a5ecef0-ece7-4e68-9e3e-889d5c2529b2 has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." - }, - "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"game_id\":\"6a5ecef0-ece7-4e68-9e3e-889d5c2529b2\",\"turn_number\":0,\"current_player\":0,\"game_phase\":\"SETUP_FIRST_ROUND\",\"turn_phase\":\"ROLL_DICE\",\"dice_rolled\":null,\"allowed_actions\":[\"PLACE_STARTING_SETTLEMENT\"],\"board_state\":{\"tiles\":[{\"id\":1,\"position\":[0,0],\"axial_coords\":[0,-2],\"type\":\"forest\",\"token\":12,\"has_robber\":false},{\"id\":2,\"position\":[0,1],\"axial_coords\":[1,-2],\"type\":\"pasture\",\"token\":5,\"has_robber\":false},{\"id\":3,\"position\":[0,2],\"axial_coords\":[2,-2],\"type\":\"forest\",\"token\":4,\"has_robber\":false},{\"id\":4,\"position\":[1,0],\"axial_coords\":[-1,-1],\"type\":\"pasture\",\"token\":8,\"has_robber\":false},{\"id\":5,\"position\":[1,1],\"axial_coords\":[0,-1],\"type\":\"hills\",\"token\":6,\"has_robber\":false},{\"id\":6,\"position\":[1,2],\"axial_coords\":[1,-1],\"type\":\"forest\",\"token\":3,\"has_robber\":false},{\"id\":7,\"position\":[1,3],\"axial_coords\":[2,-1],\"type\":\"fields\",\"token\":8,\"has_robber\":false},{\"id\":8,\"position\":[2,0],\"axial_coords\":[-2,0],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":9,\"position\":[2,1],\"axial_coords\":[-1,0],\"type\":\"forest\",\"token\":11,\"has_robber\":false},{\"id\":10,\"position\":[2,2],\"axial_coords\":[0,0],\"type\":\"desert\",\"token\":null,\"has_robber\":true},{\"id\":11,\"position\":[2,3],\"axial_coords\":[1,0],\"type\":\"mountains\",\"token\":3,\"has_robber\":false},{\"id\":12,\"position\":[2,4],\"axial_coords\":[2,0],\"type\":\"pasture\",\"token\":4,\"has_robber\":false},{\"id\":13,\"position\":[3,0],\"axial_coords\":[-2,1],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":14,\"position\":[3,1],\"axial_coords\":[-1,1],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":15,\"position\":[3,2],\"axial_coords\":[0,1],\"type\":\"fields\",\"token\":6,\"has_robber\":false},{\"id\":16,\"position\":[3,3],\"axial_coords\":[1,1],\"type\":\"pasture\",\"token\":11,\"has_robber\":false},{\"id\":17,\"position\":[4,0],\"axial_coords\":[-2,2],\"type\":\"mountains\",\"token\":5,\"has_robber\":false},{\"id\":18,\"position\":[4,1],\"axial_coords\":[-1,2],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":19,\"position\":[4,2],\"axial_coords\":[0,2],\"type\":\"mountains\",\"token\":2,\"has_robber\":false}],\"robber_position\":[2,2]},\"players_state\":[{\"player_id\":0,\"name\":\"A\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0},{\"player_id\":1,\"name\":\"B\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0}]}", - "constraints": { - "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] - } - }, - "response_schema": { - "type": "object", - "required": [ - "internal_thinking", - "action" - ], - "properties": { - "internal_thinking": { - "type": "string", - "description": "Private strategy. What's your plan and why? Be thorough and detailed (aim for several paragraphs)." - }, - "note_to_self": { - "type": "string", - "description": "Important facts for when it's your turn. Use only if essential for clarity or direct user query. Omit otherwise." - }, - "say_outloud": { - "type": "string", - "description": "A short message to other players (max 100 chars). Use for negotiation, threats, or table talk. Keep in mind you pay for speak outload." - }, - "action": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "The action type (must match one from allowed_actions in constraints)" - }, - "parameters": { - "type": "string", - "description": "Action parameters as JSON string. Example: {\"node\": 14} or {} if no parameters needed" - } - }, - "propertyOrdering": [ - "type", - "parameters" - ] - } - }, - "propertyOrdering": [ - "internal_thinking", - "note_to_self", - "say_outloud", - "action" - ] - }, - "what_happened": "• Game 6a5ecef0-ece7-4e68-9e3e-889d5c2529b2 has started with 2 players!\n• Game 6a5ecef0-ece7-4e68-9e3e-889d5c2529b2 has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_003424/A/prompts/prompt_1.txt b/examples/ai_testing/my_games/session_20260109_003424/A/prompts/prompt_1.txt deleted file mode 100644 index a1bcdc9db5bbf596808ca773eebf93e0a414f524..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_003424/A/prompts/prompt_1.txt +++ /dev/null @@ -1,86 +0,0 @@ -=== Prompt #1 for A === -Timestamp: 2026-01-09T00:34:26.972844 -Active Turn: True - ---- What Happened --- -• Game 6a5ecef0-ece7-4e68-9e3e-889d5c2529b2 has started with 2 players! -• Game 6a5ecef0-ece7-4e68-9e3e-889d5c2529b2 has started with 2 players! -• Turn 0: Player 0's turn begins. -• Turn 0: Player 0's turn begins. - ---- Response Schema --- -{ - "type": "object", - "required": [ - "internal_thinking", - "action" - ], - "properties": { - "internal_thinking": { - "type": "string", - "description": "Private strategy. What's your plan and why? Be thorough and detailed (aim for several paragraphs)." - }, - "note_to_self": { - "type": "string", - "description": "Important facts for when it's your turn. Use only if essential for clarity or direct user query. Omit otherwise." - }, - "say_outloud": { - "type": "string", - "description": "A short message to other players (max 100 chars). Use for negotiation, threats, or table talk. Keep in mind you pay for speak outload." - }, - "action": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "The action type (must match one from allowed_actions in constraints)" - }, - "parameters": { - "type": "string", - "description": "Action parameters as JSON string. Example: {\"node\": 14} or {} if no parameters needed" - } - }, - "propertyOrdering": [ - "type", - "parameters" - ] - } - }, - "propertyOrdering": [ - "internal_thinking", - "note_to_self", - "say_outloud", - "action" - ] -} - ---- Prompt Content --- -{ - "meta_data": { - "agent_name": "A", - "role": null - }, - "task_context": { - "what_just_happened": "• Game 6a5ecef0-ece7-4e68-9e3e-889d5c2529b2 has started with 2 players!\n• Game 6a5ecef0-ece7-4e68-9e3e-889d5c2529b2 has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." - }, - "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"game_id\":\"6a5ecef0-ece7-4e68-9e3e-889d5c2529b2\",\"turn_number\":0,\"current_player\":0,\"game_phase\":\"SETUP_FIRST_ROUND\",\"turn_phase\":\"ROLL_DICE\",\"dice_rolled\":null,\"allowed_actions\":[\"PLACE_STARTING_SETTLEMENT\"],\"board_state\":{\"tiles\":[{\"id\":1,\"position\":[0,0],\"axial_coords\":[0,-2],\"type\":\"forest\",\"token\":12,\"has_robber\":false},{\"id\":2,\"position\":[0,1],\"axial_coords\":[1,-2],\"type\":\"pasture\",\"token\":5,\"has_robber\":false},{\"id\":3,\"position\":[0,2],\"axial_coords\":[2,-2],\"type\":\"forest\",\"token\":4,\"has_robber\":false},{\"id\":4,\"position\":[1,0],\"axial_coords\":[-1,-1],\"type\":\"pasture\",\"token\":8,\"has_robber\":false},{\"id\":5,\"position\":[1,1],\"axial_coords\":[0,-1],\"type\":\"hills\",\"token\":6,\"has_robber\":false},{\"id\":6,\"position\":[1,2],\"axial_coords\":[1,-1],\"type\":\"forest\",\"token\":3,\"has_robber\":false},{\"id\":7,\"position\":[1,3],\"axial_coords\":[2,-1],\"type\":\"fields\",\"token\":8,\"has_robber\":false},{\"id\":8,\"position\":[2,0],\"axial_coords\":[-2,0],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":9,\"position\":[2,1],\"axial_coords\":[-1,0],\"type\":\"forest\",\"token\":11,\"has_robber\":false},{\"id\":10,\"position\":[2,2],\"axial_coords\":[0,0],\"type\":\"desert\",\"token\":null,\"has_robber\":true},{\"id\":11,\"position\":[2,3],\"axial_coords\":[1,0],\"type\":\"mountains\",\"token\":3,\"has_robber\":false},{\"id\":12,\"position\":[2,4],\"axial_coords\":[2,0],\"type\":\"pasture\",\"token\":4,\"has_robber\":false},{\"id\":13,\"position\":[3,0],\"axial_coords\":[-2,1],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":14,\"position\":[3,1],\"axial_coords\":[-1,1],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":15,\"position\":[3,2],\"axial_coords\":[0,1],\"type\":\"fields\",\"token\":6,\"has_robber\":false},{\"id\":16,\"position\":[3,3],\"axial_coords\":[1,1],\"type\":\"pasture\",\"token\":11,\"has_robber\":false},{\"id\":17,\"position\":[4,0],\"axial_coords\":[-2,2],\"type\":\"mountains\",\"token\":5,\"has_robber\":false},{\"id\":18,\"position\":[4,1],\"axial_coords\":[-1,2],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":19,\"position\":[4,2],\"axial_coords\":[0,2],\"type\":\"mountains\",\"token\":2,\"has_robber\":false}],\"robber_position\":[2,2]},\"players_state\":[{\"player_id\":0,\"name\":\"A\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0},{\"player_id\":1,\"name\":\"B\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0}]}", - "constraints": { - "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] - } -} diff --git a/examples/ai_testing/my_games/session_20260109_003424/A/responses/response_1.json b/examples/ai_testing/my_games/session_20260109_003424/A/responses/response_1.json deleted file mode 100644 index 1921f2c63ffc268c77ece9592a6b0428eacd2c67..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_003424/A/responses/response_1.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "request_number": 1, - "timestamp": "2026-01-09T00:34:52.389565", - "player_name": "A", - "success": true, - "raw_content": "{\n \"internal_thinking\": \"My objective is to place the first settlement on a node that provides a strong, diverse set of resources with high probability. I began by analyzing the `board_state.tiles` to identify hexes with favorable resource types and high-probability token numbers (6, 8, 9, 10, 11, 12). \\n\\nI looked for intersections of three hexes that would yield a good mix of Wood (W), Brick (B), Sheep (S), Wheat (Wh), and Ore (O) with high-value tokens. Two particularly strong candidate nodes emerged:\\n1. The node connecting Hex 4 (S8), Hex 5 (B6), and Hex 9 (W11). This provides Sheep (8), Brick (6), and Wood (11). The sum of pips is 8+6+11=25, and it offers diverse basic resources.\\n2. The node connecting Hex 14 (Wh9), Hex 9 (W11), and Hex 13 (B10). This provides Wheat (9), Wood (11), and Brick (10). The sum of pips is 9+11+10=30, making it numerically stronger and still offering excellent resource diversity.\\n\\nI concluded that the node connecting Hex 14 (Wh9), Hex 9 (W11), and Hex 13 (B10) is the most optimal choice due to its high-value tokens (9, 11, 10) and the critical combination of Wheat, Wood, and Brick, which are essential for early game development (roads and settlements).\\n\\nA critical piece of information is missing from the provided `game_state` JSON: the \\\"N\\\" (Nodes) lookup table, which maps `NodeID` to the hexes it touches. Without this, I cannot determine the specific `node` ID that corresponds to my identified optimal location. Since `PLACE_STARTING_SETTLEMENT` is the only allowed action and requires a `node` parameter, I must provide an integer ID. In the absence of actual node mapping, I will use the `node` ID `14` as provided in the `example_parameters` for the `place_starting_settlement` action, acknowledging this is an arbitrary choice forced by the missing data. My strategic intent is clear, even if the specific node ID is a placeholder.\",\n \"action\": {\n \"type\": \"place_starting_settlement\",\n \"parameters\": \"{\\\"node\\\": 14}\"\n }\n}", - "parsed": { - "internal_thinking": "My objective is to place the first settlement on a node that provides a strong, diverse set of resources with high probability. I began by analyzing the `board_state.tiles` to identify hexes with favorable resource types and high-probability token numbers (6, 8, 9, 10, 11, 12). \n\nI looked for intersections of three hexes that would yield a good mix of Wood (W), Brick (B), Sheep (S), Wheat (Wh), and Ore (O) with high-value tokens. Two particularly strong candidate nodes emerged:\n1. The node connecting Hex 4 (S8), Hex 5 (B6), and Hex 9 (W11). This provides Sheep (8), Brick (6), and Wood (11). The sum of pips is 8+6+11=25, and it offers diverse basic resources.\n2. The node connecting Hex 14 (Wh9), Hex 9 (W11), and Hex 13 (B10). This provides Wheat (9), Wood (11), and Brick (10). The sum of pips is 9+11+10=30, making it numerically stronger and still offering excellent resource diversity.\n\nI concluded that the node connecting Hex 14 (Wh9), Hex 9 (W11), and Hex 13 (B10) is the most optimal choice due to its high-value tokens (9, 11, 10) and the critical combination of Wheat, Wood, and Brick, which are essential for early game development (roads and settlements).\n\nA critical piece of information is missing from the provided `game_state` JSON: the \"N\" (Nodes) lookup table, which maps `NodeID` to the hexes it touches. Without this, I cannot determine the specific `node` ID that corresponds to my identified optimal location. Since `PLACE_STARTING_SETTLEMENT` is the only allowed action and requires a `node` parameter, I must provide an integer ID. In the absence of actual node mapping, I will use the `node` ID `14` as provided in the `example_parameters` for the `place_starting_settlement` action, acknowledging this is an arbitrary choice forced by the missing data. My strategic intent is clear, even if the specific node ID is a placeholder.", - "note_to_self": null, - "say_outloud": null, - "action_type": "place_starting_settlement", - "parameters": { - "node": 14 - } - }, - "model": "gemini-2.5-flash", - "tokens": { - "prompt": 1689, - "completion": 561, - "total": 6751 - }, - "latency_seconds": 24.123154163360596, - "error": null -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_003424/session_metadata.json b/examples/ai_testing/my_games/session_20260109_003424/session_metadata.json deleted file mode 100644 index e808d58fb2b8901afab76e6e4d1fa88d4b8d32c9..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_003424/session_metadata.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "session_id": "session_20260109_003424", - "start_time": "2026-01-09T00:34:24.923751", - "version": "2.0" -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_003644/A/A.md b/examples/ai_testing/my_games/session_20260109_003644/A/A.md deleted file mode 100644 index a43cfe19e66a85358722dde8afafdf2a6c2da22e..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_003644/A/A.md +++ /dev/null @@ -1,31 +0,0 @@ -# AI Agent Log: A - -**Session:** session_20260109_003644 -**Started:** 2026-01-09 00:36:44 -**Model:** gemini-2.0-flash - ---- - - -## Request #1 - šŸŽÆ ACTIVE TURN - -**Time:** 00:36:46 - -### What Happened -• Game 5db5b63c-be30-47be-8d2a-1d2cdf8bc9b5 has started with 2 players! -• Game 5db5b63c-be30-47be-8d2a-1d2cdf8bc9b5 has started with 2 players! -• Turn 0: Player 0's turn begins. -• Turn 0: Player 0's turn begins. - -### Prompt Sent -See: [prompt_1.json](prompts/prompt_1.json) - -### Response Received āœ… - -**Latency:** 24.26s | **Tokens:** 6721 - -**Thinking:** The game is in the setup phase, and I am the first player. I need to place my first settlement. My strategy is to secure a strong combination of resources, prioritizing a mix that supports both early ... - -**Says:** "Hello everyone! Time to pick my first spot. Good luck!" - ---- diff --git a/examples/ai_testing/my_games/session_20260109_003644/A/prompts/prompt_1.json b/examples/ai_testing/my_games/session_20260109_003644/A/prompts/prompt_1.json deleted file mode 100644 index 03a0d9b50848d71ac01f3118d830b268b1425f82..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_003644/A/prompts/prompt_1.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "request_number": 1, - "timestamp": "2026-01-09T00:36:46.143250", - "player_name": "A", - "is_active_turn": true, - "prompt": { - "meta_data": { - "agent_name": "A", - "role": null - }, - "task_context": { - "what_just_happened": "• Game 5db5b63c-be30-47be-8d2a-1d2cdf8bc9b5 has started with 2 players!\n• Game 5db5b63c-be30-47be-8d2a-1d2cdf8bc9b5 has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." - }, - "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"game_id\":\"5db5b63c-be30-47be-8d2a-1d2cdf8bc9b5\",\"turn_number\":0,\"current_player\":0,\"game_phase\":\"SETUP_FIRST_ROUND\",\"turn_phase\":\"ROLL_DICE\",\"dice_rolled\":null,\"allowed_actions\":[\"PLACE_STARTING_SETTLEMENT\"],\"board_state\":{\"tiles\":[{\"id\":1,\"position\":[0,0],\"axial_coords\":[0,-2],\"type\":\"forest\",\"token\":12,\"has_robber\":false},{\"id\":2,\"position\":[0,1],\"axial_coords\":[1,-2],\"type\":\"pasture\",\"token\":5,\"has_robber\":false},{\"id\":3,\"position\":[0,2],\"axial_coords\":[2,-2],\"type\":\"forest\",\"token\":4,\"has_robber\":false},{\"id\":4,\"position\":[1,0],\"axial_coords\":[-1,-1],\"type\":\"pasture\",\"token\":8,\"has_robber\":false},{\"id\":5,\"position\":[1,1],\"axial_coords\":[0,-1],\"type\":\"hills\",\"token\":6,\"has_robber\":false},{\"id\":6,\"position\":[1,2],\"axial_coords\":[1,-1],\"type\":\"forest\",\"token\":3,\"has_robber\":false},{\"id\":7,\"position\":[1,3],\"axial_coords\":[2,-1],\"type\":\"fields\",\"token\":8,\"has_robber\":false},{\"id\":8,\"position\":[2,0],\"axial_coords\":[-2,0],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":9,\"position\":[2,1],\"axial_coords\":[-1,0],\"type\":\"forest\",\"token\":11,\"has_robber\":false},{\"id\":10,\"position\":[2,2],\"axial_coords\":[0,0],\"type\":\"desert\",\"token\":null,\"has_robber\":true},{\"id\":11,\"position\":[2,3],\"axial_coords\":[1,0],\"type\":\"mountains\",\"token\":3,\"has_robber\":false},{\"id\":12,\"position\":[2,4],\"axial_coords\":[2,0],\"type\":\"pasture\",\"token\":4,\"has_robber\":false},{\"id\":13,\"position\":[3,0],\"axial_coords\":[-2,1],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":14,\"position\":[3,1],\"axial_coords\":[-1,1],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":15,\"position\":[3,2],\"axial_coords\":[0,1],\"type\":\"fields\",\"token\":6,\"has_robber\":false},{\"id\":16,\"position\":[3,3],\"axial_coords\":[1,1],\"type\":\"pasture\",\"token\":11,\"has_robber\":false},{\"id\":17,\"position\":[4,0],\"axial_coords\":[-2,2],\"type\":\"mountains\",\"token\":5,\"has_robber\":false},{\"id\":18,\"position\":[4,1],\"axial_coords\":[-1,2],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":19,\"position\":[4,2],\"axial_coords\":[0,2],\"type\":\"mountains\",\"token\":2,\"has_robber\":false}],\"robber_position\":[2,2]},\"players_state\":[{\"player_id\":0,\"name\":\"A\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0},{\"player_id\":1,\"name\":\"B\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0}]}", - "constraints": { - "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] - } - }, - "response_schema": { - "type": "object", - "required": [ - "internal_thinking", - "action" - ], - "properties": { - "internal_thinking": { - "type": "string", - "description": "Private strategy. What's your plan and why?", - "minLength": 1000 - }, - "note_to_self": { - "type": "string", - "description": "Important facts for when it's your turn. Use only if essential for clarity or direct user query. Omit otherwise.", - "maxLength": 100 - }, - "say_outloud": { - "type": "string", - "description": "A short message to other players (max 100 chars). Use for negotiation, threats, or table talk. Keep in mind you pay for speak outload.", - "maxLength": 100 - }, - "action": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "The action type (must match one from allowed_actions in constraints)" - }, - "parameters": { - "type": "string", - "description": "Action parameters as JSON string. Example: {\"node\": 14} or {} if no parameters needed" - } - }, - "propertyOrdering": [ - "type", - "parameters" - ] - } - }, - "propertyOrdering": [ - "internal_thinking", - "note_to_self", - "say_outloud", - "action" - ] - }, - "what_happened": "• Game 5db5b63c-be30-47be-8d2a-1d2cdf8bc9b5 has started with 2 players!\n• Game 5db5b63c-be30-47be-8d2a-1d2cdf8bc9b5 has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_003644/A/prompts/prompt_1.txt b/examples/ai_testing/my_games/session_20260109_003644/A/prompts/prompt_1.txt deleted file mode 100644 index c9be162bf2bc48d8391fbf15dd96a2208d0264fe..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_003644/A/prompts/prompt_1.txt +++ /dev/null @@ -1,89 +0,0 @@ -=== Prompt #1 for A === -Timestamp: 2026-01-09T00:36:46.144068 -Active Turn: True - ---- What Happened --- -• Game 5db5b63c-be30-47be-8d2a-1d2cdf8bc9b5 has started with 2 players! -• Game 5db5b63c-be30-47be-8d2a-1d2cdf8bc9b5 has started with 2 players! -• Turn 0: Player 0's turn begins. -• Turn 0: Player 0's turn begins. - ---- Response Schema --- -{ - "type": "object", - "required": [ - "internal_thinking", - "action" - ], - "properties": { - "internal_thinking": { - "type": "string", - "description": "Private strategy. What's your plan and why?", - "minLength": 1000 - }, - "note_to_self": { - "type": "string", - "description": "Important facts for when it's your turn. Use only if essential for clarity or direct user query. Omit otherwise.", - "maxLength": 100 - }, - "say_outloud": { - "type": "string", - "description": "A short message to other players (max 100 chars). Use for negotiation, threats, or table talk. Keep in mind you pay for speak outload.", - "maxLength": 100 - }, - "action": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "The action type (must match one from allowed_actions in constraints)" - }, - "parameters": { - "type": "string", - "description": "Action parameters as JSON string. Example: {\"node\": 14} or {} if no parameters needed" - } - }, - "propertyOrdering": [ - "type", - "parameters" - ] - } - }, - "propertyOrdering": [ - "internal_thinking", - "note_to_self", - "say_outloud", - "action" - ] -} - ---- Prompt Content --- -{ - "meta_data": { - "agent_name": "A", - "role": null - }, - "task_context": { - "what_just_happened": "• Game 5db5b63c-be30-47be-8d2a-1d2cdf8bc9b5 has started with 2 players!\n• Game 5db5b63c-be30-47be-8d2a-1d2cdf8bc9b5 has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", - "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." - }, - "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"game_id\":\"5db5b63c-be30-47be-8d2a-1d2cdf8bc9b5\",\"turn_number\":0,\"current_player\":0,\"game_phase\":\"SETUP_FIRST_ROUND\",\"turn_phase\":\"ROLL_DICE\",\"dice_rolled\":null,\"allowed_actions\":[\"PLACE_STARTING_SETTLEMENT\"],\"board_state\":{\"tiles\":[{\"id\":1,\"position\":[0,0],\"axial_coords\":[0,-2],\"type\":\"forest\",\"token\":12,\"has_robber\":false},{\"id\":2,\"position\":[0,1],\"axial_coords\":[1,-2],\"type\":\"pasture\",\"token\":5,\"has_robber\":false},{\"id\":3,\"position\":[0,2],\"axial_coords\":[2,-2],\"type\":\"forest\",\"token\":4,\"has_robber\":false},{\"id\":4,\"position\":[1,0],\"axial_coords\":[-1,-1],\"type\":\"pasture\",\"token\":8,\"has_robber\":false},{\"id\":5,\"position\":[1,1],\"axial_coords\":[0,-1],\"type\":\"hills\",\"token\":6,\"has_robber\":false},{\"id\":6,\"position\":[1,2],\"axial_coords\":[1,-1],\"type\":\"forest\",\"token\":3,\"has_robber\":false},{\"id\":7,\"position\":[1,3],\"axial_coords\":[2,-1],\"type\":\"fields\",\"token\":8,\"has_robber\":false},{\"id\":8,\"position\":[2,0],\"axial_coords\":[-2,0],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":9,\"position\":[2,1],\"axial_coords\":[-1,0],\"type\":\"forest\",\"token\":11,\"has_robber\":false},{\"id\":10,\"position\":[2,2],\"axial_coords\":[0,0],\"type\":\"desert\",\"token\":null,\"has_robber\":true},{\"id\":11,\"position\":[2,3],\"axial_coords\":[1,0],\"type\":\"mountains\",\"token\":3,\"has_robber\":false},{\"id\":12,\"position\":[2,4],\"axial_coords\":[2,0],\"type\":\"pasture\",\"token\":4,\"has_robber\":false},{\"id\":13,\"position\":[3,0],\"axial_coords\":[-2,1],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":14,\"position\":[3,1],\"axial_coords\":[-1,1],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":15,\"position\":[3,2],\"axial_coords\":[0,1],\"type\":\"fields\",\"token\":6,\"has_robber\":false},{\"id\":16,\"position\":[3,3],\"axial_coords\":[1,1],\"type\":\"pasture\",\"token\":11,\"has_robber\":false},{\"id\":17,\"position\":[4,0],\"axial_coords\":[-2,2],\"type\":\"mountains\",\"token\":5,\"has_robber\":false},{\"id\":18,\"position\":[4,1],\"axial_coords\":[-1,2],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":19,\"position\":[4,2],\"axial_coords\":[0,2],\"type\":\"mountains\",\"token\":2,\"has_robber\":false}],\"robber_position\":[2,2]},\"players_state\":[{\"player_id\":0,\"name\":\"A\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0},{\"player_id\":1,\"name\":\"B\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0}]}", - "constraints": { - "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.", - "allowed_actions": [ - { - "type": "place_starting_settlement", - "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" - }, - { - "type": "wait_for_response", - "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", - "example_parameters": "{}" - } - ] - } -} diff --git a/examples/ai_testing/my_games/session_20260109_003644/A/responses/response_1.json b/examples/ai_testing/my_games/session_20260109_003644/A/responses/response_1.json deleted file mode 100644 index 8f55104eaab96af6df5bfb98f14533deb99d0115..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_003644/A/responses/response_1.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "request_number": 1, - "timestamp": "2026-01-09T00:37:11.722239", - "player_name": "A", - "success": true, - "raw_content": "{\"internal_thinking\": \"The game is in the setup phase, and I am the first player. I need to place my first settlement. My strategy is to secure a strong combination of resources, prioritizing a mix that supports both early expansion (Wood, Brick, Sheep) and later development (Wheat, Ore). I lack a direct node-to-hex mapping, so I must infer good locations from the hex data and use the example parameter for the node ID. I've identified a promising location around hexes H13 (Brick 10), H14 (Wheat 9), and H17 (Ore 5), which offers Brick, Wheat, and Ore with strong numbers (10, 9, 5). This combination is excellent for building cities and development cards early. Another strong option is Sheep 8, Brick 6, Wood 11 (from H4, H5, H9) for early expansion. Given the example parameter '{\\\"node\\\": 14}', I will use node 14, hoping it corresponds to the Brick/Wheat/Ore spot (as hex 14 is Wheat 9). This sets me up for a strong development path.\", \"say_outloud\": \"Hello everyone! Time to pick my first spot. Good luck!\", \"action\": {\"type\": \"place_starting_settlement\", \"parameters\": \"{\\\"node\\\": 14}\"}}", - "parsed": { - "internal_thinking": "The game is in the setup phase, and I am the first player. I need to place my first settlement. My strategy is to secure a strong combination of resources, prioritizing a mix that supports both early expansion (Wood, Brick, Sheep) and later development (Wheat, Ore). I lack a direct node-to-hex mapping, so I must infer good locations from the hex data and use the example parameter for the node ID. I've identified a promising location around hexes H13 (Brick 10), H14 (Wheat 9), and H17 (Ore 5), which offers Brick, Wheat, and Ore with strong numbers (10, 9, 5). This combination is excellent for building cities and development cards early. Another strong option is Sheep 8, Brick 6, Wood 11 (from H4, H5, H9) for early expansion. Given the example parameter '{\"node\": 14}', I will use node 14, hoping it corresponds to the Brick/Wheat/Ore spot (as hex 14 is Wheat 9). This sets me up for a strong development path. [Response was too brief]", - "note_to_self": null, - "say_outloud": "Hello everyone! Time to pick my first spot. Good luck!", - "action_type": "place_starting_settlement", - "parameters": { - "node": 14 - } - }, - "model": "gemini-2.5-flash", - "tokens": { - "prompt": 1683, - "completion": 292, - "total": 6721 - }, - "latency_seconds": 24.259368896484375, - "error": null -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_003644/session_metadata.json b/examples/ai_testing/my_games/session_20260109_003644/session_metadata.json deleted file mode 100644 index 44e40d2eb7bd98b060211831c09a8ee46725f909..0000000000000000000000000000000000000000 --- a/examples/ai_testing/my_games/session_20260109_003644/session_metadata.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "session_id": "session_20260109_003644", - "start_time": "2026-01-09T00:36:44.063990", - "version": "2.0" -} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_010631/A/A.md b/examples/ai_testing/my_games/session_20260109_010631/A/A.md new file mode 100644 index 0000000000000000000000000000000000000000..edfde0bcbe2a5cbd5ea85a84c7915b014d049241 --- /dev/null +++ b/examples/ai_testing/my_games/session_20260109_010631/A/A.md @@ -0,0 +1,27 @@ +# AI Agent Log: A + +**Session:** session_20260109_010631 +**Started:** 2026-01-09 01:06:31 +**Model:** gemini-2.0-flash + +--- + + +## Request #1 - šŸŽÆ ACTIVE TURN + +**Time:** 01:06:33 + +### What Happened +• Game ad90ec23-0cdc-4ab0-b1e1-410aba51938e has started with 2 players! +• Turn 0: Player 0's turn begins. + +### Prompt Sent +See: [prompt_1.json](prompts/prompt_1.json) + +### Response Received āœ… + +**Latency:** 1.90s | **Tokens:** 1058 + +**Thinking:** The game has just started, and it's my turn to place the first settlement. The game state shows only one available node, Node 0, which is connected to a 'any 3:1' port. I must place a settlement, and ... + +--- diff --git a/examples/ai_testing/my_games/session_20260108_222919/A/prompts/prompt_1.json b/examples/ai_testing/my_games/session_20260109_010631/A/prompts/prompt_1.json similarity index 50% rename from examples/ai_testing/my_games/session_20260108_222919/A/prompts/prompt_1.json rename to examples/ai_testing/my_games/session_20260109_010631/A/prompts/prompt_1.json index 4cfbe017c85fc35b92779cedce32e68e4a33991c..dcb4b1983708d52b17f2b12c50b13ecd4151c2fd 100644 --- a/examples/ai_testing/my_games/session_20260108_222919/A/prompts/prompt_1.json +++ b/examples/ai_testing/my_games/session_20260109_010631/A/prompts/prompt_1.json @@ -1,6 +1,6 @@ { "request_number": 1, - "timestamp": "2026-01-08T22:29:21.092752", + "timestamp": "2026-01-09T01:06:33.147650", "player_name": "A", "is_active_turn": true, "prompt": { @@ -9,17 +9,17 @@ "role": null }, "task_context": { - "what_just_happened": "• Game a46aa39c-7765-4f3d-9c7a-fc1675373d56 has started with 2 players!\n• Game a46aa39c-7765-4f3d-9c7a-fc1675373d56 has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", + "what_just_happened": "• Game ad90ec23-0cdc-4ab0-b1e1-410aba51938e has started with 2 players!\n• Turn 0: Player 0's turn begins.", "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." }, - "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"game_id\":\"a46aa39c-7765-4f3d-9c7a-fc1675373d56\",\"turn_number\":0,\"current_player\":0,\"game_phase\":\"SETUP_FIRST_ROUND\",\"turn_phase\":\"ROLL_DICE\",\"dice_rolled\":null,\"allowed_actions\":[\"PLACE_STARTING_SETTLEMENT\"],\"board_state\":{\"tiles\":[{\"id\":1,\"position\":[0,0],\"axial_coords\":[0,-2],\"type\":\"pasture\",\"token\":6,\"has_robber\":false},{\"id\":2,\"position\":[0,1],\"axial_coords\":[1,-2],\"type\":\"forest\",\"token\":8,\"has_robber\":false},{\"id\":3,\"position\":[0,2],\"axial_coords\":[2,-2],\"type\":\"pasture\",\"token\":11,\"has_robber\":false},{\"id\":4,\"position\":[1,0],\"axial_coords\":[-1,-1],\"type\":\"fields\",\"token\":3,\"has_robber\":false},{\"id\":5,\"position\":[1,1],\"axial_coords\":[0,-1],\"type\":\"pasture\",\"token\":10,\"has_robber\":false},{\"id\":6,\"position\":[1,2],\"axial_coords\":[1,-1],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":7,\"position\":[1,3],\"axial_coords\":[2,-1],\"type\":\"mountains\",\"token\":11,\"has_robber\":false},{\"id\":8,\"position\":[2,0],\"axial_coords\":[-2,0],\"type\":\"mountains\",\"token\":4,\"has_robber\":false},{\"id\":9,\"position\":[2,1],\"axial_coords\":[-1,0],\"type\":\"forest\",\"token\":9,\"has_robber\":false},{\"id\":10,\"position\":[2,2],\"axial_coords\":[0,0],\"type\":\"mountains\",\"token\":3,\"has_robber\":false},{\"id\":11,\"position\":[2,3],\"axial_coords\":[1,0],\"type\":\"fields\",\"token\":6,\"has_robber\":false},{\"id\":12,\"position\":[2,4],\"axial_coords\":[2,0],\"type\":\"forest\",\"token\":4,\"has_robber\":false},{\"id\":13,\"position\":[3,0],\"axial_coords\":[-2,1],\"type\":\"fields\",\"token\":2,\"has_robber\":false},{\"id\":14,\"position\":[3,1],\"axial_coords\":[-1,1],\"type\":\"hills\",\"token\":12,\"has_robber\":false},{\"id\":15,\"position\":[3,2],\"axial_coords\":[0,1],\"type\":\"forest\",\"token\":8,\"has_robber\":false},{\"id\":16,\"position\":[3,3],\"axial_coords\":[1,1],\"type\":\"desert\",\"token\":null,\"has_robber\":true},{\"id\":17,\"position\":[4,0],\"axial_coords\":[-2,2],\"type\":\"hills\",\"token\":5,\"has_robber\":false},{\"id\":18,\"position\":[4,1],\"axial_coords\":[-1,2],\"type\":\"pasture\",\"token\":5,\"has_robber\":false},{\"id\":19,\"position\":[4,2],\"axial_coords\":[0,2],\"type\":\"fields\",\"token\":9,\"has_robber\":false}],\"robber_position\":[3,3]},\"players_state\":[{\"player_id\":0,\"name\":\"A\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0},{\"player_id\":1,\"name\":\"B\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0}]}", + "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"meta\":{\"curr\":\"A\",\"phase\":\"SETUP_FIRST_ROUND\",\"robber\":null,\"dice\":null},\"H\":[\"D\"],\"N\":[[[],[],\"?3\"]],\"state\":{\"bld\":[],\"rds\":[]},\"players\":{\"A\":{\"vp\":0,\"res\":{}},\"V\":{\"vp\":0,\"res\":{}}}}", "constraints": { - "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.", + "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.The 'node' parameter MUST be an exact Integer ID found in the 'N' lookup table. Do not pick an arbitrary number. If you choose Node 10, it implies you want the location defined at index 10 of Array N. Check that index specifically.", "allowed_actions": [ { "type": "place_starting_settlement", "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" + "example_parameters": "{\"node\": X}" }, { "type": "wait_for_response", @@ -79,12 +79,12 @@ "action" ] }, - "what_happened": "• Game a46aa39c-7765-4f3d-9c7a-fc1675373d56 has started with 2 players!\n• Game a46aa39c-7765-4f3d-9c7a-fc1675373d56 has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", + "what_happened": "• Game ad90ec23-0cdc-4ab0-b1e1-410aba51938e has started with 2 players!\n• Turn 0: Player 0's turn begins.", "allowed_actions": [ { "type": "place_starting_settlement", "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" + "example_parameters": "{\"node\": X}" }, { "type": "wait_for_response", diff --git a/examples/ai_testing/my_games/session_20260109_010631/A/prompts/prompt_1.txt b/examples/ai_testing/my_games/session_20260109_010631/A/prompts/prompt_1.txt new file mode 100644 index 0000000000000000000000000000000000000000..d4627e972624d07ae9a503e4e1773be4e6041170 --- /dev/null +++ b/examples/ai_testing/my_games/session_20260109_010631/A/prompts/prompt_1.txt @@ -0,0 +1,87 @@ +=== Prompt #1 for A === +Timestamp: 2026-01-09T01:06:33.148411 +Active Turn: True + +--- What Happened --- +• Game ad90ec23-0cdc-4ab0-b1e1-410aba51938e has started with 2 players! +• Turn 0: Player 0's turn begins. + +--- Response Schema --- +{ + "type": "object", + "required": [ + "internal_thinking", + "action" + ], + "properties": { + "internal_thinking": { + "type": "string", + "description": "Private strategy. What's your plan and why?", + "minLength": 1000 + }, + "note_to_self": { + "type": "string", + "description": "Important facts for when it's your turn. Use only if essential for clarity or direct user query. Omit otherwise.", + "maxLength": 100 + }, + "say_outloud": { + "type": "string", + "description": "A short message to other players (max 100 chars). Use for negotiation, threats, or table talk. Keep in mind you pay for speak outload.", + "maxLength": 100 + }, + "action": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "description": "The action type (must match one from allowed_actions in constraints)" + }, + "parameters": { + "type": "string", + "description": "Action parameters as JSON string. Example: {\"node\": 14} or {} if no parameters needed" + } + }, + "propertyOrdering": [ + "type", + "parameters" + ] + } + }, + "propertyOrdering": [ + "internal_thinking", + "note_to_self", + "say_outloud", + "action" + ] +} + +--- Prompt Content --- +{ + "meta_data": { + "agent_name": "A", + "role": null + }, + "task_context": { + "what_just_happened": "• Game ad90ec23-0cdc-4ab0-b1e1-410aba51938e has started with 2 players!\n• Turn 0: Player 0's turn begins.", + "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." + }, + "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"meta\":{\"curr\":\"A\",\"phase\":\"SETUP_FIRST_ROUND\",\"robber\":null,\"dice\":null},\"H\":[\"D\"],\"N\":[[[],[],\"?3\"]],\"state\":{\"bld\":[],\"rds\":[]},\"players\":{\"A\":{\"vp\":0,\"res\":{}},\"V\":{\"vp\":0,\"res\":{}}}}", + "constraints": { + "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.The 'node' parameter MUST be an exact Integer ID found in the 'N' lookup table. Do not pick an arbitrary number. If you choose Node 10, it implies you want the location defined at index 10 of Array N. Check that index specifically.", + "allowed_actions": [ + { + "type": "place_starting_settlement", + "description": "Place your starting settlement", + "example_parameters": "{\"node\": X}" + }, + { + "type": "wait_for_response", + "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", + "example_parameters": "{}" + } + ] + } +} diff --git a/examples/ai_testing/my_games/session_20260109_010631/A/responses/response_1.json b/examples/ai_testing/my_games/session_20260109_010631/A/responses/response_1.json new file mode 100644 index 0000000000000000000000000000000000000000..fb9bd6bd0f9ad68bd563f1872b7c987eab75b809 --- /dev/null +++ b/examples/ai_testing/my_games/session_20260109_010631/A/responses/response_1.json @@ -0,0 +1,24 @@ +{ + "request_number": 1, + "timestamp": "2026-01-09T01:06:36.425058", + "player_name": "A", + "success": true, + "raw_content": "{\n \"internal_thinking\": \"The game has just started, and it's my turn to place the first settlement. The game state shows only one available node, Node 0, which is connected to a 'any 3:1' port. I must place a settlement, and Node 0 is the only option. I will place my settlement there.\",\n \"action\": {\n \"type\": \"place_starting_settlement\",\n \"parameters\": \"{\\\"node\\\": 0}\"\n }\n}", + "parsed": { + "internal_thinking": "The game has just started, and it's my turn to place the first settlement. The game state shows only one available node, Node 0, which is connected to a 'any 3:1' port. I must place a settlement, and Node 0 is the only option. I will place my settlement there. [Response was too brief]", + "note_to_self": null, + "say_outloud": null, + "action_type": "place_starting_settlement", + "parameters": { + "node": 0 + } + }, + "model": "gemini-2.5-flash", + "tokens": { + "prompt": 779, + "completion": 112, + "total": 1058 + }, + "latency_seconds": 1.8966045379638672, + "error": null +} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_010631/session_metadata.json b/examples/ai_testing/my_games/session_20260109_010631/session_metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..c14018f96b89d56de28d35f148c280bf2c2d7450 --- /dev/null +++ b/examples/ai_testing/my_games/session_20260109_010631/session_metadata.json @@ -0,0 +1,5 @@ +{ + "session_id": "session_20260109_010631", + "start_time": "2026-01-09T01:06:31.101397", + "version": "2.0" +} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_010916/A/A.md b/examples/ai_testing/my_games/session_20260109_010916/A/A.md new file mode 100644 index 0000000000000000000000000000000000000000..b6b455d3dd1e22bc6e67bd135dc30746d47cc28c --- /dev/null +++ b/examples/ai_testing/my_games/session_20260109_010916/A/A.md @@ -0,0 +1,27 @@ +# AI Agent Log: A + +**Session:** session_20260109_010916 +**Started:** 2026-01-09 01:09:16 +**Model:** gemini-2.0-flash + +--- + + +## Request #1 - šŸŽÆ ACTIVE TURN + +**Time:** 01:09:18 + +### What Happened +• Game 3b6b3072-c70a-4df1-a372-78d6d99be424 has started with 2 players! +• Turn 0: Player 0's turn begins. + +### Prompt Sent +See: [prompt_1.json](prompts/prompt_1.json) + +### Response Received āœ… + +**Latency:** 25.27s | **Tokens:** 7423 + +**Thinking:** The game is in the SETUP_FIRST_ROUND phase, requiring me to place a starting settlement. Since resource types are unknown, my strategy is to maximize the sum of pips (probability of rolling the number... + +--- diff --git a/examples/ai_testing/my_games/session_20260109_010916/A/prompts/prompt_1.json b/examples/ai_testing/my_games/session_20260109_010916/A/prompts/prompt_1.json new file mode 100644 index 0000000000000000000000000000000000000000..faf23d18959946d27f630203f30c3733babf44eb --- /dev/null +++ b/examples/ai_testing/my_games/session_20260109_010916/A/prompts/prompt_1.json @@ -0,0 +1,95 @@ +{ + "request_number": 1, + "timestamp": "2026-01-09T01:09:18.254913", + "player_name": "A", + "is_active_turn": true, + "prompt": { + "meta_data": { + "agent_name": "A", + "role": null + }, + "task_context": { + "what_just_happened": "• Game 3b6b3072-c70a-4df1-a372-78d6d99be424 has started with 2 players!\n• Turn 0: Player 0's turn begins.", + "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." + }, + "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"meta\":{\"curr\":\"A\",\"phase\":\"SETUP_FIRST_ROUND\",\"robber\":10,\"dice\":null},\"H\":[\"\",\"?12\",\"?5\",\"?4\",\"?8\",\"?6\",\"?3\",\"?8\",\"?10\",\"?11\",\"D\",\"?3\",\"?4\",\"?10\",\"?9\",\"?6\",\"?11\",\"?5\",\"?9\",\"?2\"],\"N\":[null,[[],[1]],[[],[1],\"Wh2\"],[[],[2,1],\"Wh2\"],[[],[2]],[[],[3,2]],[[],[3],\"B2\"],[[],[3],\"B2\"],[[],[4],\"?3\"],[[],[4,1],\"?3\"],[[],[5,4,1]],[[],[5,2,1]],[[],[6,5,2]],[[],[6,3,2]],[[],[7,6,3]],[[],[7,3]],[[],[7],\"O2\"],[[],[8],\"S2\"],[[],[8,4]],[[],[9,8,4]],[[],[9,5,4]],[[],[10,9,5]],[[],[10,6,5]],[[],[11,10,6]],[[],[11,7,6]],[[],[12,11,7]],[[],[12,7],\"O2\"],[[],[12]],[[],[8],\"S2\"],[[],[13,8]],[[],[13,9,8]],[[],[14,13,9]],[[],[14,10,9]],[[],[15,14,10]],[[],[15,11,10]],[[],[16,15,11]],[[],[16,12,11]],[[],[16,12],\"?3\"],[[],[12],\"?3\"],[[],[13]],[[],[17,13],\"W2\"],[[],[17,14,13]],[[],[18,17,14]],[[],[18,15,14]],[[],[19,18,15]],[[],[19,16,15]],[[],[19,16]],[[],[16]],[[],[17],\"W2\"],[[],[17]],[[],[18,17],\"?3\"],[[],[18],\"?3\"],[[],[19,18]],[[],[19],\"?3\"],[[],[19],\"?3\"]],\"state\":{\"bld\":[],\"rds\":[]},\"players\":{\"A\":{\"vp\":0,\"res\":{}},\"B\":{\"vp\":0,\"res\":{}}}}", + "constraints": { + "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.The 'node' parameter MUST be an exact Integer ID found in the 'N' lookup table. Do not pick an arbitrary number. If you choose Node 10, it implies you want the location defined at index 10 of Array N. Check that index specifically.", + "allowed_actions": [ + { + "type": "place_starting_settlement", + "description": "Place your starting settlement", + "example_parameters": "{\"node\": X}" + }, + { + "type": "wait_for_response", + "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", + "example_parameters": "{}" + } + ] + } + }, + "response_schema": { + "type": "object", + "required": [ + "internal_thinking", + "action" + ], + "properties": { + "internal_thinking": { + "type": "string", + "description": "Private strategy. What's your plan and why?", + "minLength": 1000 + }, + "note_to_self": { + "type": "string", + "description": "Important facts for when it's your turn. Use only if essential for clarity or direct user query. Omit otherwise.", + "maxLength": 100 + }, + "say_outloud": { + "type": "string", + "description": "A short message to other players (max 100 chars). Use for negotiation, threats, or table talk. Keep in mind you pay for speak outload.", + "maxLength": 100 + }, + "action": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "description": "The action type (must match one from allowed_actions in constraints)" + }, + "parameters": { + "type": "string", + "description": "Action parameters as JSON string. Example: {\"node\": 14} or {} if no parameters needed" + } + }, + "propertyOrdering": [ + "type", + "parameters" + ] + } + }, + "propertyOrdering": [ + "internal_thinking", + "note_to_self", + "say_outloud", + "action" + ] + }, + "what_happened": "• Game 3b6b3072-c70a-4df1-a372-78d6d99be424 has started with 2 players!\n• Turn 0: Player 0's turn begins.", + "allowed_actions": [ + { + "type": "place_starting_settlement", + "description": "Place your starting settlement", + "example_parameters": "{\"node\": X}" + }, + { + "type": "wait_for_response", + "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", + "example_parameters": "{}" + } + ] +} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_010916/A/prompts/prompt_1.txt b/examples/ai_testing/my_games/session_20260109_010916/A/prompts/prompt_1.txt new file mode 100644 index 0000000000000000000000000000000000000000..b590f5238b65671cfce060568ce04710b530c07b --- /dev/null +++ b/examples/ai_testing/my_games/session_20260109_010916/A/prompts/prompt_1.txt @@ -0,0 +1,87 @@ +=== Prompt #1 for A === +Timestamp: 2026-01-09T01:09:18.255670 +Active Turn: True + +--- What Happened --- +• Game 3b6b3072-c70a-4df1-a372-78d6d99be424 has started with 2 players! +• Turn 0: Player 0's turn begins. + +--- Response Schema --- +{ + "type": "object", + "required": [ + "internal_thinking", + "action" + ], + "properties": { + "internal_thinking": { + "type": "string", + "description": "Private strategy. What's your plan and why?", + "minLength": 1000 + }, + "note_to_self": { + "type": "string", + "description": "Important facts for when it's your turn. Use only if essential for clarity or direct user query. Omit otherwise.", + "maxLength": 100 + }, + "say_outloud": { + "type": "string", + "description": "A short message to other players (max 100 chars). Use for negotiation, threats, or table talk. Keep in mind you pay for speak outload.", + "maxLength": 100 + }, + "action": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "description": "The action type (must match one from allowed_actions in constraints)" + }, + "parameters": { + "type": "string", + "description": "Action parameters as JSON string. Example: {\"node\": 14} or {} if no parameters needed" + } + }, + "propertyOrdering": [ + "type", + "parameters" + ] + } + }, + "propertyOrdering": [ + "internal_thinking", + "note_to_self", + "say_outloud", + "action" + ] +} + +--- Prompt Content --- +{ + "meta_data": { + "agent_name": "A", + "role": null + }, + "task_context": { + "what_just_happened": "• Game 3b6b3072-c70a-4df1-a372-78d6d99be424 has started with 2 players!\n• Turn 0: Player 0's turn begins.", + "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." + }, + "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"meta\":{\"curr\":\"A\",\"phase\":\"SETUP_FIRST_ROUND\",\"robber\":10,\"dice\":null},\"H\":[\"\",\"?12\",\"?5\",\"?4\",\"?8\",\"?6\",\"?3\",\"?8\",\"?10\",\"?11\",\"D\",\"?3\",\"?4\",\"?10\",\"?9\",\"?6\",\"?11\",\"?5\",\"?9\",\"?2\"],\"N\":[null,[[],[1]],[[],[1],\"Wh2\"],[[],[2,1],\"Wh2\"],[[],[2]],[[],[3,2]],[[],[3],\"B2\"],[[],[3],\"B2\"],[[],[4],\"?3\"],[[],[4,1],\"?3\"],[[],[5,4,1]],[[],[5,2,1]],[[],[6,5,2]],[[],[6,3,2]],[[],[7,6,3]],[[],[7,3]],[[],[7],\"O2\"],[[],[8],\"S2\"],[[],[8,4]],[[],[9,8,4]],[[],[9,5,4]],[[],[10,9,5]],[[],[10,6,5]],[[],[11,10,6]],[[],[11,7,6]],[[],[12,11,7]],[[],[12,7],\"O2\"],[[],[12]],[[],[8],\"S2\"],[[],[13,8]],[[],[13,9,8]],[[],[14,13,9]],[[],[14,10,9]],[[],[15,14,10]],[[],[15,11,10]],[[],[16,15,11]],[[],[16,12,11]],[[],[16,12],\"?3\"],[[],[12],\"?3\"],[[],[13]],[[],[17,13],\"W2\"],[[],[17,14,13]],[[],[18,17,14]],[[],[18,15,14]],[[],[19,18,15]],[[],[19,16,15]],[[],[19,16]],[[],[16]],[[],[17],\"W2\"],[[],[17]],[[],[18,17],\"?3\"],[[],[18],\"?3\"],[[],[19,18]],[[],[19],\"?3\"],[[],[19],\"?3\"]],\"state\":{\"bld\":[],\"rds\":[]},\"players\":{\"A\":{\"vp\":0,\"res\":{}},\"B\":{\"vp\":0,\"res\":{}}}}", + "constraints": { + "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.The 'node' parameter MUST be an exact Integer ID found in the 'N' lookup table. Do not pick an arbitrary number. If you choose Node 10, it implies you want the location defined at index 10 of Array N. Check that index specifically.", + "allowed_actions": [ + { + "type": "place_starting_settlement", + "description": "Place your starting settlement", + "example_parameters": "{\"node\": X}" + }, + { + "type": "wait_for_response", + "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", + "example_parameters": "{}" + } + ] + } +} diff --git a/examples/ai_testing/my_games/session_20260109_010916/A/responses/response_1.json b/examples/ai_testing/my_games/session_20260109_010916/A/responses/response_1.json new file mode 100644 index 0000000000000000000000000000000000000000..e3d45f1a55a5a8e002730924ef74977511b0bc67 --- /dev/null +++ b/examples/ai_testing/my_games/session_20260109_010916/A/responses/response_1.json @@ -0,0 +1,24 @@ +{ + "request_number": 1, + "timestamp": "2026-01-09T01:09:45.049474", + "player_name": "A", + "success": true, + "raw_content": "{\n \"internal_thinking\": \"The game is in the SETUP_FIRST_ROUND phase, requiring me to place a starting settlement. Since resource types are unknown, my strategy is to maximize the sum of pips (probability of rolling the numbers) for the adjacent hexes. I have evaluated all 3-hex intersections and identified Node 43 as having the highest total pips (13). It is adjacent to hexes with numbers 9, 6, and 9, which correspond to 4, 5, and 4 pips respectively. This location offers the best raw resource production given the current information.\",\n \"action\": {\n \"type\": \"place_starting_settlement\",\n \"parameters\": \"{\\\"node\\\": 43}\"\n }\n}", + "parsed": { + "internal_thinking": "The game is in the SETUP_FIRST_ROUND phase, requiring me to place a starting settlement. Since resource types are unknown, my strategy is to maximize the sum of pips (probability of rolling the numbers) for the adjacent hexes. I have evaluated all 3-hex intersections and identified Node 43 as having the highest total pips (13). It is adjacent to hexes with numbers 9, 6, and 9, which correspond to 4, 5, and 4 pips respectively. This location offers the best raw resource production given the current information. [Response was too brief]", + "note_to_self": null, + "say_outloud": null, + "action_type": "place_starting_settlement", + "parameters": { + "node": 43 + } + }, + "model": "gemini-2.5-flash", + "tokens": { + "prompt": 1363, + "completion": 168, + "total": 7423 + }, + "latency_seconds": 25.273691415786743, + "error": null +} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_010916/session_metadata.json b/examples/ai_testing/my_games/session_20260109_010916/session_metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..1050f6a785fd7bc469676b01e3de807169c57cf4 --- /dev/null +++ b/examples/ai_testing/my_games/session_20260109_010916/session_metadata.json @@ -0,0 +1,5 @@ +{ + "session_id": "session_20260109_010916", + "start_time": "2026-01-09T01:09:16.202020", + "version": "2.0" +} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_011033/session_metadata.json b/examples/ai_testing/my_games/session_20260109_011033/session_metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..ae88600065c032a3da291dfa91b55fc51ea3e051 --- /dev/null +++ b/examples/ai_testing/my_games/session_20260109_011033/session_metadata.json @@ -0,0 +1,5 @@ +{ + "session_id": "session_20260109_011033", + "start_time": "2026-01-09T01:10:33.434851", + "version": "2.0" +} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_011127/A/A.md b/examples/ai_testing/my_games/session_20260109_011127/A/A.md new file mode 100644 index 0000000000000000000000000000000000000000..903e873a01f161d780574df69a47ec15ca63928b --- /dev/null +++ b/examples/ai_testing/my_games/session_20260109_011127/A/A.md @@ -0,0 +1,29 @@ +# AI Agent Log: A + +**Session:** session_20260109_011127 +**Started:** 2026-01-09 01:11:27 +**Model:** gemini-2.0-flash + +--- + + +## Request #1 - šŸŽÆ ACTIVE TURN + +**Time:** 01:11:29 + +### What Happened +• Game ecc747bb-9af0-4c98-811a-fcffb71cc086 has started with 2 players! +• Turn 0: Player 0's turn begins. + +### Prompt Sent +See: [prompt_1.json](prompts/prompt_1.json) + +### Response Received āœ… + +**Latency:** 20.51s | **Tokens:** 6253 + +**Thinking:** Given that resource types are obscured, I must prioritize nodes with the highest probability dice numbers. Nodes 10 and 20 both offer access to hexes with numbers 6 and 8, which are the most frequent ... + +**Says:** "I'll settle on the 6 and 8, hoping for a strong start!" + +--- diff --git a/examples/ai_testing/my_games/session_20260109_011127/A/prompts/prompt_1.json b/examples/ai_testing/my_games/session_20260109_011127/A/prompts/prompt_1.json new file mode 100644 index 0000000000000000000000000000000000000000..fff8350e7668aacddd092f9dd5ac8ebd860b7baf --- /dev/null +++ b/examples/ai_testing/my_games/session_20260109_011127/A/prompts/prompt_1.json @@ -0,0 +1,95 @@ +{ + "request_number": 1, + "timestamp": "2026-01-09T01:11:29.288076", + "player_name": "A", + "is_active_turn": true, + "prompt": { + "meta_data": { + "agent_name": "A", + "role": null + }, + "task_context": { + "what_just_happened": "• Game ecc747bb-9af0-4c98-811a-fcffb71cc086 has started with 2 players!\n• Turn 0: Player 0's turn begins.", + "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." + }, + "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"meta\":{\"curr\":\"A\",\"phase\":\"SETUP_FIRST_ROUND\",\"robber\":10,\"dice\":null},\"H\":[\"\",\"?12\",\"?5\",\"?4\",\"?8\",\"?6\",\"?3\",\"?8\",\"?10\",\"?11\",\"D\",\"?3\",\"?4\",\"?10\",\"?9\",\"?6\",\"?11\",\"?5\",\"?9\",\"?2\"],\"N\":[null,[[],[1]],[[],[1],\"Wh2\"],[[],[2,1],\"Wh2\"],[[],[2]],[[],[3,2]],[[],[3],\"B2\"],[[],[3],\"B2\"],[[],[4],\"?3\"],[[],[4,1],\"?3\"],[[],[5,4,1]],[[],[5,2,1]],[[],[6,5,2]],[[],[6,3,2]],[[],[7,6,3]],[[],[7,3]],[[],[7],\"O2\"],[[],[8],\"S2\"],[[],[8,4]],[[],[9,8,4]],[[],[9,5,4]],[[],[10,9,5]],[[],[10,6,5]],[[],[11,10,6]],[[],[11,7,6]],[[],[12,11,7]],[[],[12,7],\"O2\"],[[],[12]],[[],[8],\"S2\"],[[],[13,8]],[[],[13,9,8]],[[],[14,13,9]],[[],[14,10,9]],[[],[15,14,10]],[[],[15,11,10]],[[],[16,15,11]],[[],[16,12,11]],[[],[16,12],\"?3\"],[[],[12],\"?3\"],[[],[13]],[[],[17,13],\"W2\"],[[],[17,14,13]],[[],[18,17,14]],[[],[18,15,14]],[[],[19,18,15]],[[],[19,16,15]],[[],[19,16]],[[],[16]],[[],[17],\"W2\"],[[],[17]],[[],[18,17],\"?3\"],[[],[18],\"?3\"],[[],[19,18]],[[],[19],\"?3\"],[[],[19],\"?3\"]],\"state\":{\"bld\":[],\"rds\":[]},\"players\":{\"A\":{\"vp\":0,\"res\":{}},\"B\":{\"vp\":0,\"res\":{}}}}", + "constraints": { + "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.The 'node' parameter MUST be an exact Integer ID found in the 'N' lookup table. Do not pick an arbitrary number. If you choose Node 10, it implies you want the location defined at index 10 of Array N. Check that index specifically.", + "allowed_actions": [ + { + "type": "place_starting_settlement", + "description": "Place your starting settlement", + "example_parameters": "{\"node\": X}" + }, + { + "type": "wait_for_response", + "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", + "example_parameters": "{}" + } + ] + } + }, + "response_schema": { + "type": "object", + "required": [ + "internal_thinking", + "action" + ], + "properties": { + "internal_thinking": { + "type": "string", + "description": "Private strategy. What's your plan and why?", + "minLength": 1000 + }, + "note_to_self": { + "type": "string", + "description": "Important facts for when it's your turn. Use only if essential for clarity or direct user query. Omit otherwise.", + "maxLength": 100 + }, + "say_outloud": { + "type": "string", + "description": "A short message to other players (max 100 chars). Use for negotiation, threats, or table talk. Keep in mind you pay for speak outload.", + "maxLength": 100 + }, + "action": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "description": "The action type (must match one from allowed_actions in constraints)" + }, + "parameters": { + "type": "string", + "description": "Action parameters as JSON string. Example: {\"node\": 14} or {} if no parameters needed" + } + }, + "propertyOrdering": [ + "type", + "parameters" + ] + } + }, + "propertyOrdering": [ + "internal_thinking", + "note_to_self", + "say_outloud", + "action" + ] + }, + "what_happened": "• Game ecc747bb-9af0-4c98-811a-fcffb71cc086 has started with 2 players!\n• Turn 0: Player 0's turn begins.", + "allowed_actions": [ + { + "type": "place_starting_settlement", + "description": "Place your starting settlement", + "example_parameters": "{\"node\": X}" + }, + { + "type": "wait_for_response", + "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", + "example_parameters": "{}" + } + ] +} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_011127/A/prompts/prompt_1.txt b/examples/ai_testing/my_games/session_20260109_011127/A/prompts/prompt_1.txt new file mode 100644 index 0000000000000000000000000000000000000000..f1d0142bcaadf28dcdb3f5642211db71d949f25b --- /dev/null +++ b/examples/ai_testing/my_games/session_20260109_011127/A/prompts/prompt_1.txt @@ -0,0 +1,87 @@ +=== Prompt #1 for A === +Timestamp: 2026-01-09T01:11:29.288836 +Active Turn: True + +--- What Happened --- +• Game ecc747bb-9af0-4c98-811a-fcffb71cc086 has started with 2 players! +• Turn 0: Player 0's turn begins. + +--- Response Schema --- +{ + "type": "object", + "required": [ + "internal_thinking", + "action" + ], + "properties": { + "internal_thinking": { + "type": "string", + "description": "Private strategy. What's your plan and why?", + "minLength": 1000 + }, + "note_to_self": { + "type": "string", + "description": "Important facts for when it's your turn. Use only if essential for clarity or direct user query. Omit otherwise.", + "maxLength": 100 + }, + "say_outloud": { + "type": "string", + "description": "A short message to other players (max 100 chars). Use for negotiation, threats, or table talk. Keep in mind you pay for speak outload.", + "maxLength": 100 + }, + "action": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "description": "The action type (must match one from allowed_actions in constraints)" + }, + "parameters": { + "type": "string", + "description": "Action parameters as JSON string. Example: {\"node\": 14} or {} if no parameters needed" + } + }, + "propertyOrdering": [ + "type", + "parameters" + ] + } + }, + "propertyOrdering": [ + "internal_thinking", + "note_to_self", + "say_outloud", + "action" + ] +} + +--- Prompt Content --- +{ + "meta_data": { + "agent_name": "A", + "role": null + }, + "task_context": { + "what_just_happened": "• Game ecc747bb-9af0-4c98-811a-fcffb71cc086 has started with 2 players!\n• Turn 0: Player 0's turn begins.", + "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." + }, + "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"meta\":{\"curr\":\"A\",\"phase\":\"SETUP_FIRST_ROUND\",\"robber\":10,\"dice\":null},\"H\":[\"\",\"?12\",\"?5\",\"?4\",\"?8\",\"?6\",\"?3\",\"?8\",\"?10\",\"?11\",\"D\",\"?3\",\"?4\",\"?10\",\"?9\",\"?6\",\"?11\",\"?5\",\"?9\",\"?2\"],\"N\":[null,[[],[1]],[[],[1],\"Wh2\"],[[],[2,1],\"Wh2\"],[[],[2]],[[],[3,2]],[[],[3],\"B2\"],[[],[3],\"B2\"],[[],[4],\"?3\"],[[],[4,1],\"?3\"],[[],[5,4,1]],[[],[5,2,1]],[[],[6,5,2]],[[],[6,3,2]],[[],[7,6,3]],[[],[7,3]],[[],[7],\"O2\"],[[],[8],\"S2\"],[[],[8,4]],[[],[9,8,4]],[[],[9,5,4]],[[],[10,9,5]],[[],[10,6,5]],[[],[11,10,6]],[[],[11,7,6]],[[],[12,11,7]],[[],[12,7],\"O2\"],[[],[12]],[[],[8],\"S2\"],[[],[13,8]],[[],[13,9,8]],[[],[14,13,9]],[[],[14,10,9]],[[],[15,14,10]],[[],[15,11,10]],[[],[16,15,11]],[[],[16,12,11]],[[],[16,12],\"?3\"],[[],[12],\"?3\"],[[],[13]],[[],[17,13],\"W2\"],[[],[17,14,13]],[[],[18,17,14]],[[],[18,15,14]],[[],[19,18,15]],[[],[19,16,15]],[[],[19,16]],[[],[16]],[[],[17],\"W2\"],[[],[17]],[[],[18,17],\"?3\"],[[],[18],\"?3\"],[[],[19,18]],[[],[19],\"?3\"],[[],[19],\"?3\"]],\"state\":{\"bld\":[],\"rds\":[]},\"players\":{\"A\":{\"vp\":0,\"res\":{}},\"B\":{\"vp\":0,\"res\":{}}}}", + "constraints": { + "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.The 'node' parameter MUST be an exact Integer ID found in the 'N' lookup table. Do not pick an arbitrary number. If you choose Node 10, it implies you want the location defined at index 10 of Array N. Check that index specifically.", + "allowed_actions": [ + { + "type": "place_starting_settlement", + "description": "Place your starting settlement", + "example_parameters": "{\"node\": X}" + }, + { + "type": "wait_for_response", + "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", + "example_parameters": "{}" + } + ] + } +} diff --git a/examples/ai_testing/my_games/session_20260109_011127/A/responses/response_1.json b/examples/ai_testing/my_games/session_20260109_011127/A/responses/response_1.json new file mode 100644 index 0000000000000000000000000000000000000000..c02c7e6b3819f32c318d33ab1616c145078fb6ba --- /dev/null +++ b/examples/ai_testing/my_games/session_20260109_011127/A/responses/response_1.json @@ -0,0 +1,24 @@ +{ + "request_number": 1, + "timestamp": "2026-01-09T01:11:51.117903", + "player_name": "A", + "success": true, + "raw_content": "{\n \"internal_thinking\": \"Given that resource types are obscured, I must prioritize nodes with the highest probability dice numbers. Nodes 10 and 20 both offer access to hexes with numbers 6 and 8, which are the most frequent dice rolls after 7. Node 20 is slightly superior as its third adjacent hex has a number 11, which is marginally better than the 12 associated with Node 10. Therefore, Node 20 offers the best overall probability for resource generation early in the game.\",\n \"say_outloud\": \"I'll settle on the 6 and 8, hoping for a strong start!\",\n \"action\": {\n \"type\": \"place_starting_settlement\",\n \"parameters\": \"{\\\"node\\\": 20}\"\n }\n}", + "parsed": { + "internal_thinking": "Given that resource types are obscured, I must prioritize nodes with the highest probability dice numbers. Nodes 10 and 20 both offer access to hexes with numbers 6 and 8, which are the most frequent dice rolls after 7. Node 20 is slightly superior as its third adjacent hex has a number 11, which is marginally better than the 12 associated with Node 10. Therefore, Node 20 offers the best overall probability for resource generation early in the game. [Response was too brief]", + "note_to_self": null, + "say_outloud": "I'll settle on the 6 and 8, hoping for a strong start!", + "action_type": "place_starting_settlement", + "parameters": { + "node": 20 + } + }, + "model": "gemini-2.5-flash", + "tokens": { + "prompt": 1357, + "completion": 178, + "total": 6253 + }, + "latency_seconds": 20.50733256340027, + "error": null +} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_011127/session_metadata.json b/examples/ai_testing/my_games/session_20260109_011127/session_metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..d2677cc2936eb3738677094907604fe870c87e8e --- /dev/null +++ b/examples/ai_testing/my_games/session_20260109_011127/session_metadata.json @@ -0,0 +1,5 @@ +{ + "session_id": "session_20260109_011127", + "start_time": "2026-01-09T01:11:27.239970", + "version": "2.0" +} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_011426/A/A.md b/examples/ai_testing/my_games/session_20260109_011426/A/A.md new file mode 100644 index 0000000000000000000000000000000000000000..626c6baea8f3c85e1edd71c90489a5cdcd53dff6 --- /dev/null +++ b/examples/ai_testing/my_games/session_20260109_011426/A/A.md @@ -0,0 +1,27 @@ +# AI Agent Log: A + +**Session:** session_20260109_011426 +**Started:** 2026-01-09 01:14:26 +**Model:** gemini-2.0-flash + +--- + + +## Request #1 - šŸŽÆ ACTIVE TURN + +**Time:** 01:14:28 + +### What Happened +• Game b4c8dec8-8f93-4f6f-9236-6b75aabfdcd5 has started with 2 players! +• Turn 0: Player 0's turn begins. + +### Prompt Sent +See: [prompt_1.json](prompts/prompt_1.json) + +### Response Received āœ… + +**Latency:** 3.14s | **Tokens:** 1355 + +**Thinking:** The game state indicates all hexes are 'D' (Desert), meaning no resources will be produced anywhere on the board. All nodes are isolated and yield nothing. The only distinguishing feature is a '?3' po... + +--- diff --git a/examples/ai_testing/my_games/session_20260108_223312/A/prompts/prompt_1.json b/examples/ai_testing/my_games/session_20260109_011426/A/prompts/prompt_1.json similarity index 51% rename from examples/ai_testing/my_games/session_20260108_223312/A/prompts/prompt_1.json rename to examples/ai_testing/my_games/session_20260109_011426/A/prompts/prompt_1.json index d006acf447558e1cc4438604f9069534d14298e3..c1f2d3fc5d03caa44417df22c184b84d0ea1bcd0 100644 --- a/examples/ai_testing/my_games/session_20260108_223312/A/prompts/prompt_1.json +++ b/examples/ai_testing/my_games/session_20260109_011426/A/prompts/prompt_1.json @@ -1,6 +1,6 @@ { "request_number": 1, - "timestamp": "2026-01-08T22:33:14.325702", + "timestamp": "2026-01-09T01:14:28.961725", "player_name": "A", "is_active_turn": true, "prompt": { @@ -9,17 +9,17 @@ "role": null }, "task_context": { - "what_just_happened": "• Game baa065b9-f08e-4c5b-a052-e7b82aee3348 has started with 2 players!\n• Game baa065b9-f08e-4c5b-a052-e7b82aee3348 has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", + "what_just_happened": "• Game b4c8dec8-8f93-4f6f-9236-6b75aabfdcd5 has started with 2 players!\n• Turn 0: Player 0's turn begins.", "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." }, - "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"game_id\":\"baa065b9-f08e-4c5b-a052-e7b82aee3348\",\"turn_number\":0,\"current_player\":0,\"game_phase\":\"SETUP_FIRST_ROUND\",\"turn_phase\":\"ROLL_DICE\",\"dice_rolled\":null,\"allowed_actions\":[\"PLACE_STARTING_SETTLEMENT\"],\"board_state\":{\"tiles\":[{\"id\":1,\"position\":[0,0],\"axial_coords\":[0,-2],\"type\":\"mountains\",\"token\":10,\"has_robber\":false},{\"id\":2,\"position\":[0,1],\"axial_coords\":[1,-2],\"type\":\"forest\",\"token\":11,\"has_robber\":false},{\"id\":3,\"position\":[0,2],\"axial_coords\":[2,-2],\"type\":\"pasture\",\"token\":10,\"has_robber\":false},{\"id\":4,\"position\":[1,0],\"axial_coords\":[-1,-1],\"type\":\"pasture\",\"token\":12,\"has_robber\":false},{\"id\":5,\"position\":[1,1],\"axial_coords\":[0,-1],\"type\":\"desert\",\"token\":null,\"has_robber\":true},{\"id\":6,\"position\":[1,2],\"axial_coords\":[1,-1],\"type\":\"forest\",\"token\":5,\"has_robber\":false},{\"id\":7,\"position\":[1,3],\"axial_coords\":[2,-1],\"type\":\"fields\",\"token\":4,\"has_robber\":false},{\"id\":8,\"position\":[2,0],\"axial_coords\":[-2,0],\"type\":\"forest\",\"token\":9,\"has_robber\":false},{\"id\":9,\"position\":[2,1],\"axial_coords\":[-1,0],\"type\":\"fields\",\"token\":5,\"has_robber\":false},{\"id\":10,\"position\":[2,2],\"axial_coords\":[0,0],\"type\":\"forest\",\"token\":6,\"has_robber\":false},{\"id\":11,\"position\":[2,3],\"axial_coords\":[1,0],\"type\":\"pasture\",\"token\":9,\"has_robber\":false},{\"id\":12,\"position\":[2,4],\"axial_coords\":[2,0],\"type\":\"mountains\",\"token\":3,\"has_robber\":false},{\"id\":13,\"position\":[3,0],\"axial_coords\":[-2,1],\"type\":\"hills\",\"token\":6,\"has_robber\":false},{\"id\":14,\"position\":[3,1],\"axial_coords\":[-1,1],\"type\":\"hills\",\"token\":8,\"has_robber\":false},{\"id\":15,\"position\":[3,2],\"axial_coords\":[0,1],\"type\":\"fields\",\"token\":3,\"has_robber\":false},{\"id\":16,\"position\":[3,3],\"axial_coords\":[1,1],\"type\":\"fields\",\"token\":4,\"has_robber\":false},{\"id\":17,\"position\":[4,0],\"axial_coords\":[-2,2],\"type\":\"hills\",\"token\":11,\"has_robber\":false},{\"id\":18,\"position\":[4,1],\"axial_coords\":[-1,2],\"type\":\"mountains\",\"token\":8,\"has_robber\":false},{\"id\":19,\"position\":[4,2],\"axial_coords\":[0,2],\"type\":\"pasture\",\"token\":2,\"has_robber\":false}],\"robber_position\":[1,1]},\"players_state\":[{\"player_id\":0,\"name\":\"A\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0},{\"player_id\":1,\"name\":\"B\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0}]}", + "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"meta\":{\"curr\":\"A\",\"phase\":\"SETUP_FIRST_ROUND\",\"robber\":null,\"dice\":null},\"H\":[\"D\",\"D\",\"D\",\"D\",\"D\",\"D\",\"D\",\"D\",\"D\",\"D\",\"D\",\"D\",\"D\",\"D\",\"D\",\"D\",\"D\",\"D\",\"D\"],\"N\":[[[],[],\"?3\"],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]]],\"state\":{\"bld\":[],\"rds\":[]},\"players\":{\"A\":{\"vp\":0,\"res\":{}},\"B\":{\"vp\":0,\"res\":{}}}}", "constraints": { "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.", "allowed_actions": [ { "type": "place_starting_settlement", "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" + "example_parameters": "{\"node\": X}" }, { "type": "wait_for_response", @@ -79,12 +79,12 @@ "action" ] }, - "what_happened": "• Game baa065b9-f08e-4c5b-a052-e7b82aee3348 has started with 2 players!\n• Game baa065b9-f08e-4c5b-a052-e7b82aee3348 has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", + "what_happened": "• Game b4c8dec8-8f93-4f6f-9236-6b75aabfdcd5 has started with 2 players!\n• Turn 0: Player 0's turn begins.", "allowed_actions": [ { "type": "place_starting_settlement", "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" + "example_parameters": "{\"node\": X}" }, { "type": "wait_for_response", diff --git a/examples/ai_testing/my_games/session_20260109_011426/A/prompts/prompt_1.txt b/examples/ai_testing/my_games/session_20260109_011426/A/prompts/prompt_1.txt new file mode 100644 index 0000000000000000000000000000000000000000..0542be2da11a6887df7aaec30e0ef3875953acfb --- /dev/null +++ b/examples/ai_testing/my_games/session_20260109_011426/A/prompts/prompt_1.txt @@ -0,0 +1,87 @@ +=== Prompt #1 for A === +Timestamp: 2026-01-09T01:14:28.962619 +Active Turn: True + +--- What Happened --- +• Game b4c8dec8-8f93-4f6f-9236-6b75aabfdcd5 has started with 2 players! +• Turn 0: Player 0's turn begins. + +--- Response Schema --- +{ + "type": "object", + "required": [ + "internal_thinking", + "action" + ], + "properties": { + "internal_thinking": { + "type": "string", + "description": "Private strategy. What's your plan and why?", + "minLength": 1000 + }, + "note_to_self": { + "type": "string", + "description": "Important facts for when it's your turn. Use only if essential for clarity or direct user query. Omit otherwise.", + "maxLength": 100 + }, + "say_outloud": { + "type": "string", + "description": "A short message to other players (max 100 chars). Use for negotiation, threats, or table talk. Keep in mind you pay for speak outload.", + "maxLength": 100 + }, + "action": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "description": "The action type (must match one from allowed_actions in constraints)" + }, + "parameters": { + "type": "string", + "description": "Action parameters as JSON string. Example: {\"node\": 14} or {} if no parameters needed" + } + }, + "propertyOrdering": [ + "type", + "parameters" + ] + } + }, + "propertyOrdering": [ + "internal_thinking", + "note_to_self", + "say_outloud", + "action" + ] +} + +--- Prompt Content --- +{ + "meta_data": { + "agent_name": "A", + "role": null + }, + "task_context": { + "what_just_happened": "• Game b4c8dec8-8f93-4f6f-9236-6b75aabfdcd5 has started with 2 players!\n• Turn 0: Player 0's turn begins.", + "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." + }, + "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"meta\":{\"curr\":\"A\",\"phase\":\"SETUP_FIRST_ROUND\",\"robber\":null,\"dice\":null},\"H\":[\"D\",\"D\",\"D\",\"D\",\"D\",\"D\",\"D\",\"D\",\"D\",\"D\",\"D\",\"D\",\"D\",\"D\",\"D\",\"D\",\"D\",\"D\",\"D\"],\"N\":[[[],[],\"?3\"],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]],[[],[]]],\"state\":{\"bld\":[],\"rds\":[]},\"players\":{\"A\":{\"vp\":0,\"res\":{}},\"B\":{\"vp\":0,\"res\":{}}}}", + "constraints": { + "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.", + "allowed_actions": [ + { + "type": "place_starting_settlement", + "description": "Place your starting settlement", + "example_parameters": "{\"node\": X}" + }, + { + "type": "wait_for_response", + "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", + "example_parameters": "{}" + } + ] + } +} diff --git a/examples/ai_testing/my_games/session_20260109_011426/A/responses/response_1.json b/examples/ai_testing/my_games/session_20260109_011426/A/responses/response_1.json new file mode 100644 index 0000000000000000000000000000000000000000..b8683e20859565e44f1925793af4d3aab88b3d76 --- /dev/null +++ b/examples/ai_testing/my_games/session_20260109_011426/A/responses/response_1.json @@ -0,0 +1,24 @@ +{ + "request_number": 1, + "timestamp": "2026-01-09T01:14:33.413662", + "player_name": "A", + "success": true, + "raw_content": "{\"internal_thinking\": \"The game state indicates all hexes are 'D' (Desert), meaning no resources will be produced anywhere on the board. All nodes are isolated and yield nothing. The only distinguishing feature is a '?3' port at Node 0. Since no node provides any resource benefit, placing the settlement on Node 0 is as good as any other, and it might be a valid starting point if the board is somehow dynamically generated later or if this is a test scenario with a broken board. I must make a valid move according to the allowed actions.\", \"action\": {\"type\": \"place_starting_settlement\", \"parameters\": \"{\\\"node\\\": 0}\"}}", + "parsed": { + "internal_thinking": "The game state indicates all hexes are 'D' (Desert), meaning no resources will be produced anywhere on the board. All nodes are isolated and yield nothing. The only distinguishing feature is a '?3' port at Node 0. Since no node provides any resource benefit, placing the settlement on Node 0 is as good as any other, and it might be a valid starting point if the board is somehow dynamically generated later or if this is a test scenario with a broken board. I must make a valid move according to the allowed actions. [Response was too brief]", + "note_to_self": null, + "say_outloud": null, + "action_type": "place_starting_settlement", + "parameters": { + "node": 0 + } + }, + "model": "gemini-2.5-flash", + "tokens": { + "prompt": 920, + "completion": 141, + "total": 1355 + }, + "latency_seconds": 3.1412761211395264, + "error": null +} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_011426/session_metadata.json b/examples/ai_testing/my_games/session_20260109_011426/session_metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..00b8d84609337e4ec933b6d7e65bb1006ef38d1c --- /dev/null +++ b/examples/ai_testing/my_games/session_20260109_011426/session_metadata.json @@ -0,0 +1,5 @@ +{ + "session_id": "session_20260109_011426", + "start_time": "2026-01-09T01:14:26.911818", + "version": "2.0" +} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_011936/A/A.md b/examples/ai_testing/my_games/session_20260109_011936/A/A.md new file mode 100644 index 0000000000000000000000000000000000000000..3ebdc58b1e9c256845af76ed514936fb0cd6c912 --- /dev/null +++ b/examples/ai_testing/my_games/session_20260109_011936/A/A.md @@ -0,0 +1,27 @@ +# AI Agent Log: A + +**Session:** session_20260109_011936 +**Started:** 2026-01-09 01:19:36 +**Model:** gemini-2.0-flash + +--- + + +## Request #1 - šŸŽÆ ACTIVE TURN + +**Time:** 01:19:39 + +### What Happened +• Game 0a3039e4-2d6c-46d2-be62-99a3c3eccad7 has started with 2 players! +• Turn 0: Player 0's turn begins. + +### Prompt Sent +See: [prompt_1.json](prompts/prompt_1.json) + +### Response Received āœ… + +**Latency:** 12.05s | **Tokens:** 4842 + +**Thinking:** The current phase is 'SETUP_FIRST_ROUND', and I need to place a starting settlement. My strategy is to choose a node with the highest probability numbers (6 and 8 are best) to maximize resource genera... + +--- diff --git a/examples/ai_testing/my_games/session_20260108_223627/A/prompts/prompt_1.json b/examples/ai_testing/my_games/session_20260109_011936/A/prompts/prompt_1.json similarity index 51% rename from examples/ai_testing/my_games/session_20260108_223627/A/prompts/prompt_1.json rename to examples/ai_testing/my_games/session_20260109_011936/A/prompts/prompt_1.json index 5fac58cd565c0e3b328b846150e36021ccfc1ed6..d194e70eb09a1f29a34971eb2c99a6c79c18de5c 100644 --- a/examples/ai_testing/my_games/session_20260108_223627/A/prompts/prompt_1.json +++ b/examples/ai_testing/my_games/session_20260109_011936/A/prompts/prompt_1.json @@ -1,6 +1,6 @@ { "request_number": 1, - "timestamp": "2026-01-08T22:36:29.983283", + "timestamp": "2026-01-09T01:19:39.007118", "player_name": "A", "is_active_turn": true, "prompt": { @@ -9,17 +9,17 @@ "role": null }, "task_context": { - "what_just_happened": "• Game 4f333137-6e86-40ca-99ff-cdc2141d7caa has started with 2 players!\n• Game 4f333137-6e86-40ca-99ff-cdc2141d7caa has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", + "what_just_happened": "• Game 0a3039e4-2d6c-46d2-be62-99a3c3eccad7 has started with 2 players!\n• Turn 0: Player 0's turn begins.", "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." }, - "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"game_id\":\"4f333137-6e86-40ca-99ff-cdc2141d7caa\",\"turn_number\":0,\"current_player\":0,\"game_phase\":\"SETUP_FIRST_ROUND\",\"turn_phase\":\"ROLL_DICE\",\"dice_rolled\":null,\"allowed_actions\":[\"PLACE_STARTING_SETTLEMENT\"],\"board_state\":{\"tiles\":[{\"id\":1,\"position\":[0,0],\"axial_coords\":[0,-2],\"type\":\"pasture\",\"token\":4,\"has_robber\":false},{\"id\":2,\"position\":[0,1],\"axial_coords\":[1,-2],\"type\":\"hills\",\"token\":11,\"has_robber\":false},{\"id\":3,\"position\":[0,2],\"axial_coords\":[2,-2],\"type\":\"pasture\",\"token\":10,\"has_robber\":false},{\"id\":4,\"position\":[1,0],\"axial_coords\":[-1,-1],\"type\":\"forest\",\"token\":3,\"has_robber\":false},{\"id\":5,\"position\":[1,1],\"axial_coords\":[0,-1],\"type\":\"hills\",\"token\":12,\"has_robber\":false},{\"id\":6,\"position\":[1,2],\"axial_coords\":[1,-1],\"type\":\"pasture\",\"token\":8,\"has_robber\":false},{\"id\":7,\"position\":[1,3],\"axial_coords\":[2,-1],\"type\":\"fields\",\"token\":6,\"has_robber\":false},{\"id\":8,\"position\":[2,0],\"axial_coords\":[-2,0],\"type\":\"mountains\",\"token\":3,\"has_robber\":false},{\"id\":9,\"position\":[2,1],\"axial_coords\":[-1,0],\"type\":\"forest\",\"token\":2,\"has_robber\":false},{\"id\":10,\"position\":[2,2],\"axial_coords\":[0,0],\"type\":\"fields\",\"token\":11,\"has_robber\":false},{\"id\":11,\"position\":[2,3],\"axial_coords\":[1,0],\"type\":\"hills\",\"token\":5,\"has_robber\":false},{\"id\":12,\"position\":[2,4],\"axial_coords\":[2,0],\"type\":\"forest\",\"token\":4,\"has_robber\":false},{\"id\":13,\"position\":[3,0],\"axial_coords\":[-2,1],\"type\":\"pasture\",\"token\":10,\"has_robber\":false},{\"id\":14,\"position\":[3,1],\"axial_coords\":[-1,1],\"type\":\"forest\",\"token\":5,\"has_robber\":false},{\"id\":15,\"position\":[3,2],\"axial_coords\":[0,1],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":16,\"position\":[3,3],\"axial_coords\":[1,1],\"type\":\"fields\",\"token\":6,\"has_robber\":false},{\"id\":17,\"position\":[4,0],\"axial_coords\":[-2,2],\"type\":\"mountains\",\"token\":9,\"has_robber\":false},{\"id\":18,\"position\":[4,1],\"axial_coords\":[-1,2],\"type\":\"desert\",\"token\":null,\"has_robber\":true},{\"id\":19,\"position\":[4,2],\"axial_coords\":[0,2],\"type\":\"mountains\",\"token\":8,\"has_robber\":false}],\"robber_position\":[4,1]},\"players_state\":[{\"player_id\":0,\"name\":\"A\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0},{\"player_id\":1,\"name\":\"B\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0}]}", + "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"meta\":{\"curr\":\"A\",\"phase\":\"SETUP_FIRST_ROUND\",\"robber\":10,\"dice\":null},\"H\":[\"\",\"?12\",\"?5\",\"?4\",\"?8\",\"?6\",\"?3\",\"?8\",\"?10\",\"?11\",\"D\",\"?3\",\"?4\",\"?10\",\"?9\",\"?6\",\"?11\",\"?5\",\"?9\",\"?2\"],\"N\":[null,[[],[1]],[[],[1],\"Wh2\"],[[],[2,1],\"Wh2\"],[[],[2]],[[],[3,2]],[[],[3],\"B2\"],[[],[3],\"B2\"],[[],[4],\"?3\"],[[],[4,1],\"?3\"],[[],[5,4,1]],[[],[5,2,1]],[[],[6,5,2]],[[],[6,3,2]],[[],[7,6,3]],[[],[7,3]],[[],[7],\"O2\"],[[],[8],\"S2\"],[[],[8,4]],[[],[9,8,4]],[[],[9,5,4]],[[],[10,9,5]],[[],[10,6,5]],[[],[11,10,6]],[[],[11,7,6]],[[],[12,11,7]],[[],[12,7],\"O2\"],[[],[12]],[[],[8],\"S2\"],[[],[13,8]],[[],[13,9,8]],[[],[14,13,9]],[[],[14,10,9]],[[],[15,14,10]],[[],[15,11,10]],[[],[16,15,11]],[[],[16,12,11]],[[],[16,12],\"?3\"],[[],[12],\"?3\"],[[],[13]],[[],[17,13],\"W2\"],[[],[17,14,13]],[[],[18,17,14]],[[],[18,15,14]],[[],[19,18,15]],[[],[19,16,15]],[[],[19,16]],[[],[16]],[[],[17],\"W2\"],[[],[17]],[[],[18,17],\"?3\"],[[],[18],\"?3\"],[[],[19,18]],[[],[19],\"?3\"],[[],[19],\"?3\"]],\"state\":{\"bld\":[],\"rds\":[]},\"players\":{\"A\":{\"vp\":0,\"res\":{}},\"B\":{\"vp\":0,\"res\":{}}}}", "constraints": { "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.", "allowed_actions": [ { "type": "place_starting_settlement", "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" + "example_parameters": "{\"node\": X}" }, { "type": "wait_for_response", @@ -79,12 +79,12 @@ "action" ] }, - "what_happened": "• Game 4f333137-6e86-40ca-99ff-cdc2141d7caa has started with 2 players!\n• Game 4f333137-6e86-40ca-99ff-cdc2141d7caa has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", + "what_happened": "• Game 0a3039e4-2d6c-46d2-be62-99a3c3eccad7 has started with 2 players!\n• Turn 0: Player 0's turn begins.", "allowed_actions": [ { "type": "place_starting_settlement", "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" + "example_parameters": "{\"node\": X}" }, { "type": "wait_for_response", diff --git a/examples/ai_testing/my_games/session_20260109_011936/A/prompts/prompt_1.txt b/examples/ai_testing/my_games/session_20260109_011936/A/prompts/prompt_1.txt new file mode 100644 index 0000000000000000000000000000000000000000..9bfc7771375091d4d995949c8897e652ce1f73c0 --- /dev/null +++ b/examples/ai_testing/my_games/session_20260109_011936/A/prompts/prompt_1.txt @@ -0,0 +1,87 @@ +=== Prompt #1 for A === +Timestamp: 2026-01-09T01:19:39.008072 +Active Turn: True + +--- What Happened --- +• Game 0a3039e4-2d6c-46d2-be62-99a3c3eccad7 has started with 2 players! +• Turn 0: Player 0's turn begins. + +--- Response Schema --- +{ + "type": "object", + "required": [ + "internal_thinking", + "action" + ], + "properties": { + "internal_thinking": { + "type": "string", + "description": "Private strategy. What's your plan and why?", + "minLength": 1000 + }, + "note_to_self": { + "type": "string", + "description": "Important facts for when it's your turn. Use only if essential for clarity or direct user query. Omit otherwise.", + "maxLength": 100 + }, + "say_outloud": { + "type": "string", + "description": "A short message to other players (max 100 chars). Use for negotiation, threats, or table talk. Keep in mind you pay for speak outload.", + "maxLength": 100 + }, + "action": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "description": "The action type (must match one from allowed_actions in constraints)" + }, + "parameters": { + "type": "string", + "description": "Action parameters as JSON string. Example: {\"node\": 14} or {} if no parameters needed" + } + }, + "propertyOrdering": [ + "type", + "parameters" + ] + } + }, + "propertyOrdering": [ + "internal_thinking", + "note_to_self", + "say_outloud", + "action" + ] +} + +--- Prompt Content --- +{ + "meta_data": { + "agent_name": "A", + "role": null + }, + "task_context": { + "what_just_happened": "• Game 0a3039e4-2d6c-46d2-be62-99a3c3eccad7 has started with 2 players!\n• Turn 0: Player 0's turn begins.", + "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." + }, + "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"meta\":{\"curr\":\"A\",\"phase\":\"SETUP_FIRST_ROUND\",\"robber\":10,\"dice\":null},\"H\":[\"\",\"?12\",\"?5\",\"?4\",\"?8\",\"?6\",\"?3\",\"?8\",\"?10\",\"?11\",\"D\",\"?3\",\"?4\",\"?10\",\"?9\",\"?6\",\"?11\",\"?5\",\"?9\",\"?2\"],\"N\":[null,[[],[1]],[[],[1],\"Wh2\"],[[],[2,1],\"Wh2\"],[[],[2]],[[],[3,2]],[[],[3],\"B2\"],[[],[3],\"B2\"],[[],[4],\"?3\"],[[],[4,1],\"?3\"],[[],[5,4,1]],[[],[5,2,1]],[[],[6,5,2]],[[],[6,3,2]],[[],[7,6,3]],[[],[7,3]],[[],[7],\"O2\"],[[],[8],\"S2\"],[[],[8,4]],[[],[9,8,4]],[[],[9,5,4]],[[],[10,9,5]],[[],[10,6,5]],[[],[11,10,6]],[[],[11,7,6]],[[],[12,11,7]],[[],[12,7],\"O2\"],[[],[12]],[[],[8],\"S2\"],[[],[13,8]],[[],[13,9,8]],[[],[14,13,9]],[[],[14,10,9]],[[],[15,14,10]],[[],[15,11,10]],[[],[16,15,11]],[[],[16,12,11]],[[],[16,12],\"?3\"],[[],[12],\"?3\"],[[],[13]],[[],[17,13],\"W2\"],[[],[17,14,13]],[[],[18,17,14]],[[],[18,15,14]],[[],[19,18,15]],[[],[19,16,15]],[[],[19,16]],[[],[16]],[[],[17],\"W2\"],[[],[17]],[[],[18,17],\"?3\"],[[],[18],\"?3\"],[[],[19,18]],[[],[19],\"?3\"],[[],[19],\"?3\"]],\"state\":{\"bld\":[],\"rds\":[]},\"players\":{\"A\":{\"vp\":0,\"res\":{}},\"B\":{\"vp\":0,\"res\":{}}}}", + "constraints": { + "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.", + "allowed_actions": [ + { + "type": "place_starting_settlement", + "description": "Place your starting settlement", + "example_parameters": "{\"node\": X}" + }, + { + "type": "wait_for_response", + "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", + "example_parameters": "{}" + } + ] + } +} diff --git a/examples/ai_testing/my_games/session_20260109_011936/A/responses/response_1.json b/examples/ai_testing/my_games/session_20260109_011936/A/responses/response_1.json new file mode 100644 index 0000000000000000000000000000000000000000..ee9fe951da50f286fdd1c537d62c12503680341b --- /dev/null +++ b/examples/ai_testing/my_games/session_20260109_011936/A/responses/response_1.json @@ -0,0 +1,24 @@ +{ + "request_number": 1, + "timestamp": "2026-01-09T01:19:52.367325", + "player_name": "A", + "success": true, + "raw_content": "{\n \"internal_thinking\": \"The current phase is 'SETUP_FIRST_ROUND', and I need to place a starting settlement. My strategy is to choose a node with the highest probability numbers (6 and 8 are best) to maximize resource generation. I will also consider nodes that offer good resource diversity or access to ports, if the numbers are comparable. I've analyzed all nodes and their connected hex numbers. Nodes connected to Hex 10 (Desert) are bad due to the robber. I identified Node 20 (connected to ?11, ?6, ?8) and Node 43 (connected to ?9, ?6, ?9) as particularly strong due to their high-probability numbers (6, 8, 9). Node 20 has both a 6 and an 8, which are the two best numbers. Node 43 has a 6 and two 9s, which is also excellent. I will choose Node 20 for its strong 6 and 8 combination.\",\n \"action\": {\n \"type\": \"place_starting_settlement\",\n \"parameters\": \"{\\\"node\\\": 20}\"\n }\n}", + "parsed": { + "internal_thinking": "The current phase is 'SETUP_FIRST_ROUND', and I need to place a starting settlement. My strategy is to choose a node with the highest probability numbers (6 and 8 are best) to maximize resource generation. I will also consider nodes that offer good resource diversity or access to ports, if the numbers are comparable. I've analyzed all nodes and their connected hex numbers. Nodes connected to Hex 10 (Desert) are bad due to the robber. I identified Node 20 (connected to ?11, ?6, ?8) and Node 43 (connected to ?9, ?6, ?9) as particularly strong due to their high-probability numbers (6, 8, 9). Node 20 has both a 6 and an 8, which are the two best numbers. Node 43 has a 6 and two 9s, which is also excellent. I will choose Node 20 for its strong 6 and 8 combination. [Response was too brief]", + "note_to_self": null, + "say_outloud": null, + "action_type": "place_starting_settlement", + "parameters": { + "node": 20 + } + }, + "model": "gemini-2.5-flash", + "tokens": { + "prompt": 1305, + "completion": 253, + "total": 4842 + }, + "latency_seconds": 12.054322242736816, + "error": null +} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_011936/session_metadata.json b/examples/ai_testing/my_games/session_20260109_011936/session_metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..dcc419d77643743ae69211cf0ef9d51363660ac9 --- /dev/null +++ b/examples/ai_testing/my_games/session_20260109_011936/session_metadata.json @@ -0,0 +1,5 @@ +{ + "session_id": "session_20260109_011936", + "start_time": "2026-01-09T01:19:36.929664", + "version": "2.0" +} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_012412/session_metadata.json b/examples/ai_testing/my_games/session_20260109_012412/session_metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..dff98ff912da96e251b6b3349619a7e512d68459 --- /dev/null +++ b/examples/ai_testing/my_games/session_20260109_012412/session_metadata.json @@ -0,0 +1,5 @@ +{ + "session_id": "session_20260109_012412", + "start_time": "2026-01-09T01:24:12.184271", + "version": "2.0" +} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_012437/A/A.md b/examples/ai_testing/my_games/session_20260109_012437/A/A.md new file mode 100644 index 0000000000000000000000000000000000000000..17ab80b16335c4091666e59b392fcc88ede5fad1 --- /dev/null +++ b/examples/ai_testing/my_games/session_20260109_012437/A/A.md @@ -0,0 +1,27 @@ +# AI Agent Log: A + +**Session:** session_20260109_012437 +**Started:** 2026-01-09 01:24:37 +**Model:** gemini-2.0-flash + +--- + + +## Request #1 - šŸŽÆ ACTIVE TURN + +**Time:** 01:24:39 + +### What Happened +• Game 77641455-aabc-4b43-8a81-f7ed21beab96 has started with 2 players! +• Turn 0: Player 0's turn begins. + +### Prompt Sent +See: [prompt_1.json](prompts/prompt_1.json) + +### Response Received āœ… + +**Latency:** 19.16s | **Tokens:** 5778 + +**Thinking:** I need to place my first settlement. My strategy is to pick a node that provides a good combination of diverse resources and high-probability dice rolls (6s and 8s) to maximize early resource generati... + +--- diff --git a/examples/ai_testing/my_games/session_20260108_221416/A/prompts/prompt_1.json b/examples/ai_testing/my_games/session_20260109_012437/A/prompts/prompt_1.json similarity index 51% rename from examples/ai_testing/my_games/session_20260108_221416/A/prompts/prompt_1.json rename to examples/ai_testing/my_games/session_20260109_012437/A/prompts/prompt_1.json index 3305fa6dc141f4052ec51124205a3b37875ebc9b..e277acc3f1c9506e2c5bd23755a64e58789ed338 100644 --- a/examples/ai_testing/my_games/session_20260108_221416/A/prompts/prompt_1.json +++ b/examples/ai_testing/my_games/session_20260109_012437/A/prompts/prompt_1.json @@ -1,6 +1,6 @@ { "request_number": 1, - "timestamp": "2026-01-08T22:14:18.829221", + "timestamp": "2026-01-09T01:24:39.260193", "player_name": "A", "is_active_turn": true, "prompt": { @@ -9,17 +9,17 @@ "role": null }, "task_context": { - "what_just_happened": "• Game 3feae058-df26-4222-9f6c-c42d55d2e41d has started with 2 players!\n• Game 3feae058-df26-4222-9f6c-c42d55d2e41d has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", + "what_just_happened": "• Game 77641455-aabc-4b43-8a81-f7ed21beab96 has started with 2 players!\n• Turn 0: Player 0's turn begins.", "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." }, - "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"game_id\":\"3feae058-df26-4222-9f6c-c42d55d2e41d\",\"turn_number\":0,\"current_player\":0,\"game_phase\":\"SETUP_FIRST_ROUND\",\"turn_phase\":\"ROLL_DICE\",\"dice_rolled\":null,\"allowed_actions\":[\"PLACE_STARTING_SETTLEMENT\"],\"board_state\":{\"tiles\":[{\"id\":1,\"position\":[0,0],\"axial_coords\":[0,-2],\"type\":\"pasture\",\"token\":10,\"has_robber\":false},{\"id\":2,\"position\":[0,1],\"axial_coords\":[1,-2],\"type\":\"pasture\",\"token\":11,\"has_robber\":false},{\"id\":3,\"position\":[0,2],\"axial_coords\":[2,-2],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":4,\"position\":[1,0],\"axial_coords\":[-1,-1],\"type\":\"desert\",\"token\":null,\"has_robber\":true},{\"id\":5,\"position\":[1,1],\"axial_coords\":[0,-1],\"type\":\"forest\",\"token\":2,\"has_robber\":false},{\"id\":6,\"position\":[1,2],\"axial_coords\":[1,-1],\"type\":\"mountains\",\"token\":3,\"has_robber\":false},{\"id\":7,\"position\":[1,3],\"axial_coords\":[2,-1],\"type\":\"fields\",\"token\":5,\"has_robber\":false},{\"id\":8,\"position\":[2,0],\"axial_coords\":[-2,0],\"type\":\"pasture\",\"token\":6,\"has_robber\":false},{\"id\":9,\"position\":[2,1],\"axial_coords\":[-1,0],\"type\":\"pasture\",\"token\":11,\"has_robber\":false},{\"id\":10,\"position\":[2,2],\"axial_coords\":[0,0],\"type\":\"fields\",\"token\":8,\"has_robber\":false},{\"id\":11,\"position\":[2,3],\"axial_coords\":[1,0],\"type\":\"forest\",\"token\":6,\"has_robber\":false},{\"id\":12,\"position\":[2,4],\"axial_coords\":[2,0],\"type\":\"forest\",\"token\":4,\"has_robber\":false},{\"id\":13,\"position\":[3,0],\"axial_coords\":[-2,1],\"type\":\"hills\",\"token\":10,\"has_robber\":false},{\"id\":14,\"position\":[3,1],\"axial_coords\":[-1,1],\"type\":\"fields\",\"token\":9,\"has_robber\":false},{\"id\":15,\"position\":[3,2],\"axial_coords\":[0,1],\"type\":\"mountains\",\"token\":5,\"has_robber\":false},{\"id\":16,\"position\":[3,3],\"axial_coords\":[1,1],\"type\":\"hills\",\"token\":8,\"has_robber\":false},{\"id\":17,\"position\":[4,0],\"axial_coords\":[-2,2],\"type\":\"mountains\",\"token\":3,\"has_robber\":false},{\"id\":18,\"position\":[4,1],\"axial_coords\":[-1,2],\"type\":\"forest\",\"token\":12,\"has_robber\":false},{\"id\":19,\"position\":[4,2],\"axial_coords\":[0,2],\"type\":\"hills\",\"token\":4,\"has_robber\":false}],\"robber_position\":[1,0]},\"players_state\":[{\"player_id\":0,\"name\":\"A\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0},{\"player_id\":1,\"name\":\"B\",\"cards\":[],\"dev_cards\":[],\"settlements\":[],\"cities\":[],\"roads\":[],\"victory_points\":0,\"has_longest_road\":false,\"has_largest_army\":false,\"knights_played\":0}]}", + "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"meta\":{\"curr\":\"A\",\"phase\":\"SETUP_FIRST_ROUND\",\"robber\":10,\"dice\":null},\"H\":[\"\",\"W12\",\"S5\",\"W4\",\"S8\",\"B6\",\"W3\",\"Wh8\",\"B10\",\"W11\",\"D\",\"O3\",\"S4\",\"B10\",\"Wh9\",\"Wh6\",\"S11\",\"O5\",\"Wh9\",\"O2\"],\"N\":[null,[[2,9],[1]],[[1,3],[1],\"Wh2\"],[[2,4,11],[2,1],\"Wh2\"],[[3,5],[2]],[[4,6,13],[3,2]],[[5,7],[3],\"B2\"],[[6,15],[3],\"B2\"],[[9,18],[4],\"?3\"],[[8,10,1],[4,1],\"?3\"],[[9,11,20],[5,4,1]],[[10,12,3],[5,2,1]],[[11,13,22],[6,5,2]],[[12,14,5],[6,3,2]],[[13,15,24],[7,6,3]],[[14,16,7],[7,3]],[[15,26],[7],\"O2\"],[[18,28],[8],\"S2\"],[[17,19,8],[8,4]],[[18,20,30],[9,8,4]],[[19,21,10],[9,5,4]],[[20,22,32],[10,9,5]],[[21,23,12],[10,6,5]],[[22,24,34],[11,10,6]],[[23,25,14],[11,7,6]],[[24,26,36],[12,11,7]],[[25,27,16],[12,7],\"O2\"],[[26,38],[12]],[[29,17],[8],\"S2\"],[[28,30,39],[13,8]],[[29,31,19],[13,9,8]],[[30,32,41],[14,13,9]],[[31,33,21],[14,10,9]],[[32,34,43],[15,14,10]],[[33,35,23],[15,11,10]],[[34,36,45],[16,15,11]],[[35,37,25],[16,12,11]],[[36,38,47],[16,12],\"?3\"],[[37,27],[12],\"?3\"],[[40,29],[13]],[[39,41,48],[17,13],\"W2\"],[[40,42,31],[17,14,13]],[[41,43,50],[18,17,14]],[[42,44,33],[18,15,14]],[[43,45,52],[19,18,15]],[[44,46,35],[19,16,15]],[[45,47,54],[19,16]],[[46,37],[16]],[[49,40],[17],\"W2\"],[[48,50],[17]],[[49,51,42],[18,17],\"?3\"],[[50,52],[18],\"?3\"],[[51,53,44],[19,18]],[[52,54],[19],\"?3\"],[[53,46],[19],\"?3\"]],\"state\":{\"bld\":[],\"rds\":[]},\"players\":{\"A\":{\"vp\":0,\"res\":{}},\"B\":{\"vp\":0,\"res\":{}}}}", "constraints": { "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.", "allowed_actions": [ { "type": "place_starting_settlement", "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" + "example_parameters": "{\"node\": X}" }, { "type": "wait_for_response", @@ -79,12 +79,12 @@ "action" ] }, - "what_happened": "• Game 3feae058-df26-4222-9f6c-c42d55d2e41d has started with 2 players!\n• Game 3feae058-df26-4222-9f6c-c42d55d2e41d has started with 2 players!\n• Turn 0: Player 0's turn begins.\n• Turn 0: Player 0's turn begins.", + "what_happened": "• Game 77641455-aabc-4b43-8a81-f7ed21beab96 has started with 2 players!\n• Turn 0: Player 0's turn begins.", "allowed_actions": [ { "type": "place_starting_settlement", "description": "Place your starting settlement", - "example_parameters": "{\"node\": 14}" + "example_parameters": "{\"node\": X}" }, { "type": "wait_for_response", diff --git a/examples/ai_testing/my_games/session_20260109_012437/A/prompts/prompt_1.txt b/examples/ai_testing/my_games/session_20260109_012437/A/prompts/prompt_1.txt new file mode 100644 index 0000000000000000000000000000000000000000..04a2e98f82d61022d944fe34e3c6f3c24b863bfd --- /dev/null +++ b/examples/ai_testing/my_games/session_20260109_012437/A/prompts/prompt_1.txt @@ -0,0 +1,87 @@ +=== Prompt #1 for A === +Timestamp: 2026-01-09T01:24:39.261566 +Active Turn: True + +--- What Happened --- +• Game 77641455-aabc-4b43-8a81-f7ed21beab96 has started with 2 players! +• Turn 0: Player 0's turn begins. + +--- Response Schema --- +{ + "type": "object", + "required": [ + "internal_thinking", + "action" + ], + "properties": { + "internal_thinking": { + "type": "string", + "description": "Private strategy. What's your plan and why?", + "minLength": 1000 + }, + "note_to_self": { + "type": "string", + "description": "Important facts for when it's your turn. Use only if essential for clarity or direct user query. Omit otherwise.", + "maxLength": 100 + }, + "say_outloud": { + "type": "string", + "description": "A short message to other players (max 100 chars). Use for negotiation, threats, or table talk. Keep in mind you pay for speak outload.", + "maxLength": 100 + }, + "action": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "description": "The action type (must match one from allowed_actions in constraints)" + }, + "parameters": { + "type": "string", + "description": "Action parameters as JSON string. Example: {\"node\": 14} or {} if no parameters needed" + } + }, + "propertyOrdering": [ + "type", + "parameters" + ] + } + }, + "propertyOrdering": [ + "internal_thinking", + "note_to_self", + "say_outloud", + "action" + ] +} + +--- Prompt Content --- +{ + "meta_data": { + "agent_name": "A", + "role": null + }, + "task_context": { + "what_just_happened": "• Game 77641455-aabc-4b43-8a81-f7ed21beab96 has started with 2 players!\n• Turn 0: Player 0's turn begins.", + "instructions": "Analyze the game state and select the optimal move from 'allowed_actions'. You have 2 possible actions. If you wish to negotiate or wait for other players, select the 'wait_for_response' action." + }, + "game_state": "\n 1. LOOKUP TABLES:\n • \"H\" (Hexes): Array where Index = HexID. Value = Resource+Num.\n Example: H[1]=\"W12\" -> Hex 1 is Wood 12.\n • \"N\" (Nodes): Array where Index = NodeID.\n Format: [ [Neighbors], [HexIDs], Port? ]\n Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5].\n\n2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert.\n ?3=Any 3:1 port, X2=Specific Resource 2:1 port.\n\n3. STATE: \"bld\"=[NodeID, Owner, Type], \"rds\"=[[From,To], Owner].\n\n4. PLAYERS: \"res\"={Resource:Count}, \"dev\"={\"h\":[Hidden Cards], \"r\":[Revealed] (K=Knight)}, \n \"stat\"=[\"LR\" (Longest Road), \"LA\" (Largest Army)].\n\n5. ROBBER: Located at HexID specified in \"meta.robber\". H[id] is blocked.\n\nJSON:\n{\"meta\":{\"curr\":\"A\",\"phase\":\"SETUP_FIRST_ROUND\",\"robber\":10,\"dice\":null},\"H\":[\"\",\"W12\",\"S5\",\"W4\",\"S8\",\"B6\",\"W3\",\"Wh8\",\"B10\",\"W11\",\"D\",\"O3\",\"S4\",\"B10\",\"Wh9\",\"Wh6\",\"S11\",\"O5\",\"Wh9\",\"O2\"],\"N\":[null,[[2,9],[1]],[[1,3],[1],\"Wh2\"],[[2,4,11],[2,1],\"Wh2\"],[[3,5],[2]],[[4,6,13],[3,2]],[[5,7],[3],\"B2\"],[[6,15],[3],\"B2\"],[[9,18],[4],\"?3\"],[[8,10,1],[4,1],\"?3\"],[[9,11,20],[5,4,1]],[[10,12,3],[5,2,1]],[[11,13,22],[6,5,2]],[[12,14,5],[6,3,2]],[[13,15,24],[7,6,3]],[[14,16,7],[7,3]],[[15,26],[7],\"O2\"],[[18,28],[8],\"S2\"],[[17,19,8],[8,4]],[[18,20,30],[9,8,4]],[[19,21,10],[9,5,4]],[[20,22,32],[10,9,5]],[[21,23,12],[10,6,5]],[[22,24,34],[11,10,6]],[[23,25,14],[11,7,6]],[[24,26,36],[12,11,7]],[[25,27,16],[12,7],\"O2\"],[[26,38],[12]],[[29,17],[8],\"S2\"],[[28,30,39],[13,8]],[[29,31,19],[13,9,8]],[[30,32,41],[14,13,9]],[[31,33,21],[14,10,9]],[[32,34,43],[15,14,10]],[[33,35,23],[15,11,10]],[[34,36,45],[16,15,11]],[[35,37,25],[16,12,11]],[[36,38,47],[16,12],\"?3\"],[[37,27],[12],\"?3\"],[[40,29],[13]],[[39,41,48],[17,13],\"W2\"],[[40,42,31],[17,14,13]],[[41,43,50],[18,17,14]],[[42,44,33],[18,15,14]],[[43,45,52],[19,18,15]],[[44,46,35],[19,16,15]],[[45,47,54],[19,16]],[[46,37],[16]],[[49,40],[17],\"W2\"],[[48,50],[17]],[[49,51,42],[18,17],\"?3\"],[[50,52],[18],\"?3\"],[[51,53,44],[19,18]],[[52,54],[19],\"?3\"],[[53,46],[19],\"?3\"]],\"state\":{\"bld\":[],\"rds\":[]},\"players\":{\"A\":{\"vp\":0,\"res\":{}},\"B\":{\"vp\":0,\"res\":{}}}}", + "constraints": { + "usage_instructions": "Choose one action type from the list below. Populate the 'parameters' field in your response strictly according to the 'example_parameters' structure provided.", + "allowed_actions": [ + { + "type": "place_starting_settlement", + "description": "Place your starting settlement", + "example_parameters": "{\"node\": X}" + }, + { + "type": "wait_for_response", + "description": "Do nothing on the board, just wait or communicate. Use this when you want to talk, negotiate, or think without taking a game action.", + "example_parameters": "{}" + } + ] + } +} diff --git a/examples/ai_testing/my_games/session_20260109_012437/A/responses/response_1.json b/examples/ai_testing/my_games/session_20260109_012437/A/responses/response_1.json new file mode 100644 index 0000000000000000000000000000000000000000..54c4e2cb042ba8049502a1a58b7150b930b86a1e --- /dev/null +++ b/examples/ai_testing/my_games/session_20260109_012437/A/responses/response_1.json @@ -0,0 +1,24 @@ +{ + "request_number": 1, + "timestamp": "2026-01-09T01:25:00.006102", + "player_name": "A", + "success": true, + "raw_content": "{\"internal_thinking\": \"I need to place my first settlement. My strategy is to pick a node that provides a good combination of diverse resources and high-probability dice rolls (6s and 8s) to maximize early resource generation. I've analyzed the nodes and identified Node 20 as a strong candidate. Node 20 connects to Hexes 9 (W11), 5 (B6), and 4 (S8). This gives me Wood (11), Brick (6), and Sheep (8). The B6 and S8 are high-probability numbers, and W11 adds to resource diversity. This will provide a solid foundation for building roads and additional settlements early in the game. Node 10 was also a strong contender, but Node 20 has a slightly better Wood roll (11 vs 12).\", \"action\": {\"type\": \"place_starting_settlement\", \"parameters\": \"{\\\"node\\\": 20}\"}}", + "parsed": { + "internal_thinking": "I need to place my first settlement. My strategy is to pick a node that provides a good combination of diverse resources and high-probability dice rolls (6s and 8s) to maximize early resource generation. I've analyzed the nodes and identified Node 20 as a strong candidate. Node 20 connects to Hexes 9 (W11), 5 (B6), and 4 (S8). This gives me Wood (11), Brick (6), and Sheep (8). The B6 and S8 are high-probability numbers, and W11 adds to resource diversity. This will provide a solid foundation for building roads and additional settlements early in the game. Node 10 was also a strong contender, but Node 20 has a slightly better Wood roll (11 vs 12). [Response was too brief]", + "note_to_self": null, + "say_outloud": null, + "action_type": "place_starting_settlement", + "parameters": { + "node": 20 + } + }, + "model": "gemini-2.5-flash", + "tokens": { + "prompt": 1625, + "completion": 205, + "total": 5778 + }, + "latency_seconds": 19.164077043533325, + "error": null +} \ No newline at end of file diff --git a/examples/ai_testing/my_games/session_20260109_012437/session_metadata.json b/examples/ai_testing/my_games/session_20260109_012437/session_metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..92bd6e91c1bd9ac13125e017ca57cf6927186e29 --- /dev/null +++ b/examples/ai_testing/my_games/session_20260109_012437/session_metadata.json @@ -0,0 +1,5 @@ +{ + "session_id": "session_20260109_012437", + "start_time": "2026-01-09T01:24:37.208028", + "version": "2.0" +} \ No newline at end of file diff --git a/examples/ai_testing/sample_states/captured_game_optimized.txt b/examples/ai_testing/sample_states/captured_game_optimized.txt index e79080c3730d2b5469a0d6c92599f4ff7af05b4f..78ebf9272b37ab35733450a55a46ca0d80d0e0b0 100644 --- a/examples/ai_testing/sample_states/captured_game_optimized.txt +++ b/examples/ai_testing/sample_states/captured_game_optimized.txt @@ -20,6 +20,6 @@ JSON: "meta":{"curr":"shon","phase":"SETUP_FIRST_ROUND","robber":10,"dice":null}, "H":["","W12","S5","W4","S8","B6","W3","Wh8","B10","W11","D","O3","S4","B10","Wh9","Wh6","S11","O5","Wh9","O2"], "N":[null,[[2,9],[1]],[[1,3],[1],"Wh2"],[[2,4,11],[2,1],"Wh2"],[[3,5],[2]],[[4,6,13],[3,2]],[[5,7],[3],"B2"],[[6,15],[3],"B2"],[[9,18],[4],"?3"],[[8,10,1],[4,1],"?3"],[[9,11,20],[5,4,1]],[[10,12,3],[5,2,1]],[[11,13,22],[6,5,2]],[[12,14,5],[6,3,2]],[[13,15,24],[7,6,3]],[[14,16,7],[7,3]],[[15,26],[7],"O2"],[[18,28],[8],"S2"],[[17,19,8],[8,4]],[[18,20,30],[9,8,4]],[[19,21,10],[9,5,4]],[[20,22,32],[10,9,5]],[[21,23,12],[10,6,5]],[[22,24,34],[11,10,6]],[[23,25,14],[11,7,6]],[[24,26,36],[12,11,7]],[[25,27,16],[12,7],"O2"],[[26,38],[12]],[[29,17],[8],"S2"],[[28,30,39],[13,8]],[[29,31,19],[13,9,8]],[[30,32,41],[14,13,9]],[[31,33,21],[14,10,9]],[[32,34,43],[15,14,10]],[[33,35,23],[15,11,10]],[[34,36,45],[16,15,11]],[[35,37,25],[16,12,11]],[[36,38,47],[16,12],"?3"],[[37,27],[12],"?3"],[[40,29],[13]],[[39,41,48],[17,13],"W2"],[[40,42,31],[17,14,13]],[[41,43,50],[18,17,14]],[[42,44,33],[18,15,14]],[[43,45,52],[19,18,15]],[[44,46,35],[19,16,15]],[[45,47,54],[19,16]],[[46,37],[16]],[[49,40],[17],"W2"],[[48,50],[17]],[[49,51,42],[18,17],"?3"],[[50,52],[18],"?3"],[[51,53,44],[19,18]],[[52,54],[19],"?3"],[[53,46],[19],"?3"]], - "state":{"bld":[[12,"shon","S"]],"rds":[]}, + "state":{"bld":[],"rds":[]}, "players":{"shon":{"vp":1,"res":{}},"daniel":{"vp":0,"res":{}},"nadav":{"vp":0,"res":{}}} } \ No newline at end of file diff --git a/pycatan/ai/__init__.py b/pycatan/ai/__init__.py index fad54e311b30428556f5a33a6ea2c27a60b0f480..5567d8a9efa7e1b2bd99b4e80a1f5673d254aeec 100644 --- a/pycatan/ai/__init__.py +++ b/pycatan/ai/__init__.py @@ -68,6 +68,7 @@ from pycatan.ai.prompt_manager import PromptManager from pycatan.ai.response_parser import ResponseParser from pycatan.ai.llm_client import LLMResponse, GeminiClient, create_llm_client from pycatan.ai.schemas import ResponseType, ACTIVE_TURN_RESPONSE_SCHEMA, OBSERVING_RESPONSE_SCHEMA +from pycatan.ai.state_optimizer import optimize_state_for_ai, format_with_legend, game_state_to_dict __all__ = [ # Main classes @@ -93,4 +94,9 @@ __all__ = [ "ResponseType", "ACTIVE_TURN_RESPONSE_SCHEMA", "OBSERVING_RESPONSE_SCHEMA", + + # State optimization + "optimize_state_for_ai", + "format_with_legend", + "game_state_to_dict", ] diff --git a/pycatan/ai/ai_manager.py b/pycatan/ai/ai_manager.py index 6b32f02596f0c5c74f4843317bd3ba4acf7ff262..03066939398ef88eed7ceed2cba4747285f4da7c 100644 --- a/pycatan/ai/ai_manager.py +++ b/pycatan/ai/ai_manager.py @@ -675,7 +675,17 @@ class AIManager: message: Human-readable description affected_players: List of affected player IDs """ + # šŸ› FIX: Prevent duplicate events when multiple AI players call this + # Each AIUser calls this, but we only want to add the event once + # Check if this exact event was already added recently for agent_name, agent in self.agents.items(): + # Check if the last event is identical (duplicate) + if (agent.recent_events and + agent.recent_events[-1].get('message') == message and + agent.recent_events[-1].get('type') == event_type): + # Skip - event already added + continue + # Add event to all agents (they all see what happens) agent.add_event(event_type, message) diff --git a/pycatan/ai/ai_user.py b/pycatan/ai/ai_user.py index b816db8bb216fd50e034f3a5edc64d6e3d4c3a13..78c876d4a27fd99f97c89ccd37ec976234478706 100644 --- a/pycatan/ai/ai_user.py +++ b/pycatan/ai/ai_user.py @@ -13,6 +13,7 @@ AIUser is the bridge between GameManager and the AI system: from typing import List, Optional, Dict, Any, TYPE_CHECKING from pycatan.players.user import User from pycatan.management.actions import Action, ActionType, GameState +from pycatan.ai.state_optimizer import game_state_to_dict, optimize_state_for_ai if TYPE_CHECKING: from pycatan.ai.ai_manager import AIManager @@ -313,46 +314,24 @@ class AIUser(User): def _game_state_to_dict(self, game_state: GameState) -> Dict[str, Any]: """ - Convert GameState object to dictionary for AIManager. + Convert GameState object to optimized compact dictionary for AIManager. + + Uses game_state_to_dict to convert to captured_game.json format, + then optimize_state_for_ai to create compact format. Args: game_state: GameState object Returns: - Dictionary representation + Optimized compact state dictionary (H, N, state, players, meta) """ - # Basic conversion - can be enhanced - return { - "game_id": game_state.game_id, - "turn_number": game_state.turn_number, - "current_player": game_state.current_player, - "game_phase": game_state.game_phase.name if hasattr(game_state.game_phase, 'name') else str(game_state.game_phase), - "turn_phase": game_state.turn_phase.name if hasattr(game_state.turn_phase, 'name') else str(game_state.turn_phase), - "dice_rolled": game_state.dice_rolled, - "allowed_actions": game_state.allowed_actions, - # Board state - "board_state": { - "tiles": game_state.board_state.tiles if hasattr(game_state.board_state, 'tiles') else [], - "robber_position": game_state.board_state.robber_position if hasattr(game_state.board_state, 'robber_position') else None, - } if game_state.board_state else {}, - # Players state - "players_state": [ - { - "player_id": p.player_id, - "name": p.name, - "cards": p.cards, - "dev_cards": p.dev_cards, - "settlements": p.settlements, - "cities": p.cities, - "roads": p.roads, - "victory_points": p.victory_points, - "has_longest_road": p.has_longest_road, - "has_largest_army": p.has_largest_army, - "knights_played": p.knights_played - } - for p in game_state.players_state - ] if game_state.players_state else [] - } + # Step 1: Convert GameState to captured_game.json format + verbose_state = game_state_to_dict(game_state) + + # Step 2: Optimize to compact format + optimized_state = optimize_state_for_ai(verbose_state) + + return optimized_state def notify_game_event( self, diff --git a/pycatan/ai/state_filter.py b/pycatan/ai/state_filter.py index 79af3ce29ecd35a942a36c7ac49d0d822fc15c38..82b709b33055e803ea0f2b1897c7ea9e6d7d850d 100644 --- a/pycatan/ai/state_filter.py +++ b/pycatan/ai/state_filter.py @@ -48,18 +48,20 @@ class StateFilter: def filter_game_state(self, raw_state: Dict[str, Any]) -> Dict[str, Any]: """ - Main filtering method - returns optimized compact state AS-IS. + Main filtering method - returns optimized compact state. - The state is already in compact format (H, N, players, bld, rds, meta). - This filter just returns it directly - the compactness IS the optimization. + The state is now in compact format (H, N, players, bld, rds, meta). + This filter can apply perspective-specific filtering if needed, + but for now returns it directly as the compactness IS the optimization. Args: - raw_state: Optimized game state (already compact) + raw_state: Optimized game state from state_optimizer (compact format) Returns: The same compact state (H, N arrays, etc.) """ - # The optimized state is already perfect for LLM consumption + # The optimized state from state_optimizer is already perfect for LLM consumption + # It uses compact arrays and codes to minimize token usage # Just return it as-is return raw_state diff --git a/pycatan/ai/state_optimizer.py b/pycatan/ai/state_optimizer.py new file mode 100644 index 0000000000000000000000000000000000000000..ce71fb5bce50763d95bffe65dada03e1628047fc --- /dev/null +++ b/pycatan/ai/state_optimizer.py @@ -0,0 +1,345 @@ +""" +State Optimizer - Compact Game State Representation + +Converts verbose game state to a compact, LLM-optimized format. +This significantly reduces token usage while maintaining all essential information. + +Format: +- H (Hexes): Array indexed by hex ID containing resource type + number +- N (Nodes): Array indexed by node ID with neighbors, adjacent hexes, and port info +- state: Buildings and roads with owner info +- players: Compact player data with resources, dev cards, and stats +- meta: Game metadata (current player, phase, robber position, dice) + +NOTE: This is the same code as in play_and_capture.py - kept in sync for consistency. +""" + +from typing import Dict, Any, List, Optional + + +def game_state_to_dict(game_state) -> Dict[str, Any]: + """ + Convert GameState object to captured_game.json format. + + This replicates WebVisualization._convert_game_state logic + to produce the format that optimize_state_for_ai expects. + + Args: + game_state: GameState object from GameManager + + Returns: + Dictionary in captured_game.json format + """ + from pycatan.config.board_definition import board_definition + + # If already a dict, return as-is + if isinstance(game_state, dict): + return game_state + + # Resource type mapping (internal -> web) + TILE_TYPE_MAP = { + 'forest': 'wood', + 'hills': 'brick', + 'pasture': 'sheep', + 'fields': 'wheat', + 'mountains': 'ore', + 'desert': 'desert' + } + + result = { + 'hexes': [], + 'settlements': [], + 'cities': [], + 'roads': [], + 'harbors': [], + 'players': [], + 'points': [], + 'current_player': getattr(game_state, 'current_player', 0), + 'current_phase': game_state.game_phase.name if hasattr(game_state.game_phase, 'name') else str(game_state.game_phase), + 'dice_result': getattr(game_state, 'dice_rolled', None), + } + + # Convert board data + if hasattr(game_state, 'board_state') and game_state.board_state: + board = game_state.board_state + + # Convert hexes/tiles + if hasattr(board, 'tiles') and board.tiles: + for tile in board.tiles: + if isinstance(tile, dict): + tile_type = tile.get('type', 'desert') + # Map internal type names to standard names + mapped_type = TILE_TYPE_MAP.get(tile_type, tile_type) + + result['hexes'].append({ + 'id': tile.get('id', 0), + 'type': mapped_type, + 'number': tile.get('token'), + 'has_robber': tile.get('has_robber', False) + }) + + # Convert harbors + if hasattr(board, 'harbors') and board.harbors: + for i, harbor in enumerate(board.harbors): + if isinstance(harbor, dict): + result['harbors'].append({ + 'id': i + 1, + 'type': harbor.get('resource', 'any'), + 'ratio': harbor.get('ratio', 3), + 'point_one': harbor.get('point_one', 0), + 'point_two': harbor.get('point_two', 0) + }) + + # Convert buildings + if hasattr(board, 'buildings') and board.buildings: + for point_id, info in board.buildings.items(): + if isinstance(info, dict): + b_type = info.get('type', 'settlement') + owner = info.get('owner', 0) + entry = { + 'id': f"b_{point_id}", + 'vertex': point_id, + 'player': owner + 1 # Convert to 1-based + } + if b_type == 'settlement': + result['settlements'].append(entry) + elif b_type == 'city': + result['cities'].append(entry) + + # Convert roads + if hasattr(board, 'roads') and board.roads: + for road in board.roads: + if isinstance(road, dict): + result['roads'].append({ + 'from': road.get('start_point_id', 0), + 'to': road.get('end_point_id', 0), + 'player': road.get('owner', 0) + 1 + }) + + # Convert players + if hasattr(game_state, 'players_state') and game_state.players_state: + for p in game_state.players_state: + # Get cards list (handle enums) + cards_list = [] + if hasattr(p, 'cards'): + for card in p.cards: + if isinstance(card, str): + cards_list.append(card) + else: + card_name = card.name if hasattr(card, 'name') else str(card) + if "." in card_name: + card_name = card_name.split(".")[-1] + cards_list.append(card_name.lower()) + + # Get dev cards list + dev_cards_list = [] + if hasattr(p, 'dev_cards'): + for card in p.dev_cards: + if isinstance(card, str): + dev_cards_list.append(card) + else: + card_name = card.name if hasattr(card, 'name') else str(card) + if "." in card_name: + card_name = card_name.split(".")[-1] + dev_cards_list.append(card_name) + + result['players'].append({ + 'id': p.player_id, + 'name': p.name, + 'victory_points': p.victory_points, + 'cards_list': cards_list, + 'dev_cards_list': dev_cards_list, + 'has_longest_road': p.has_longest_road, + 'has_largest_army': p.has_largest_army, + 'knights_played': p.knights_played + }) + + # Get points from board_definition (static structure - always correct!) + for point_id in board_definition.get_all_point_ids(): + point_def = board_definition.points.get(point_id) + if point_def: + result['points'].append({ + 'point_id': point_id, + 'adjacent_points': point_def.adjacent_points, + 'adjacent_hexes': point_def.adjacent_hexes + }) + + return result + + +def optimize_state_for_ai(input_data: Dict[str, Any]) -> Dict[str, Any]: + """ + ×ž×ž×™×Ø את מצב המשחק למבנה אופטימלי עבור AI. + מדחה את המידע ×•×ž×”×™×Ø ×“×•×¤×œ×™×§×¦×™×•×Ŗ. + + This function expects game state in the format produced by web_visualization + or captured_game.json (with hexes, points, harbors, players, etc.) + """ + # טיפול בעטיפה אם ×§×™×™×ž×Ŗ + data = input_data['state'] if 'state' in input_data else input_data + + # מילוני קיצור + RES_MAP = {"wood": "W", "brick": "B", "sheep": "S", "wheat": "Wh", "ore": "O", "desert": "D"} + TYPE_MAP = {"settlement": "S", "city": "C"} + + # 1. יצירת ×ž×¢×Ø×š הקהים (H) + hexes = data.get('hexes', []) + if hexes: + max_hex_id = max([h['id'] for h in hexes], default=0) + hex_array = [""] * (max_hex_id + 1) + + robber_hex = None + for h in hexes: + if h.get('has_robber'): + robber_hex = h['id'] + t = RES_MAP.get(h['type'], "?") + # אם יש ×ž×”×¤×Ø מוהיפים אותו, אחרת (×ž×“×‘×Ø) רק את ההוג + num = h.get('number') or h.get('token') # Support both 'number' and 'token' + val = f"{t}{num}" if num else t + hex_array[h['id']] = val + else: + hex_array = [] + robber_hex = None + + # 2. מיפוי נמלים + port_map = {} + for p in data.get('harbors', []): + harbor_type = p.get('type') or p.get('resource', 'any') # Support both formats + t = RES_MAP.get(harbor_type, "Any") if harbor_type != "any" else "?" + code = f"{t}{p['ratio']}" + port_map[p['point_one']] = code + port_map[p['point_two']] = code + + # 3. יצירת ×ž×¢×Ø×š ×¦×ž×Ŗ×™× (N) + points = data.get('points', []) + if points: + max_point_id = max([p['point_id'] for p in points], default=0) + nodes_array = [None] * (max_point_id + 1) + + for p in points: + # המבנה: [ [שכנים], [הקהים], נמל? ] + val = [p['adjacent_points'], p['adjacent_hexes']] + if p['point_id'] in port_map: + val.append(port_map[p['point_id']]) + nodes_array[p['point_id']] = val + else: + nodes_array = [] + + # 4. עיבוד שחקנים + players = {} + pid_to_name = {} + for pl in data.get('players', []): + name = pl['name'] + pid_to_name[pl['id']] = name + + # הפירת משאבים + res_list = pl.get('cards_list', []) + res_compact = {} + if res_list: + for r in set(res_list): + r_key = RES_MAP.get(r.lower(), r) + res_compact[r_key] = res_list.count(r) + + p_obj = {"vp": pl['victory_points'], "res": res_compact} + + # קלפי פיתוח + knights = pl.get('knights_played', 0) + hidden = pl.get('dev_cards_list', []) + if knights > 0 or hidden: + p_obj["dev"] = {} + if hidden: + p_obj["dev"]["h"] = hidden + if knights: + p_obj["dev"]["r"] = ["K"] * knights + + # דגלים מיוחדים (LR / LA) + flags = [] + if pl.get('has_longest_road'): + flags.append("LR") # Longest Road + if pl.get('has_largest_army'): + flags.append("LA") # Largest Army + + if flags: + p_obj["stat"] = flags + + players[name] = p_obj + + # 5. מצב הלוח (בניינים ×•×“×Ø×›×™×) + bld = [] + for b in data.get('settlements', []): + owner_id = b.get('player', 1) - 1 # ×”×ž×Ø×” מ-1-based ל-0-based + owner = pid_to_name.get(owner_id, "?") + bld.append([b['vertex'], owner, "S"]) + + for b in data.get('cities', []): + owner_id = b.get('player', 1) - 1 # ×”×ž×Ø×” מ-1-based ל-0-based + owner = pid_to_name.get(owner_id, "?") + bld.append([b['vertex'], owner, "C"]) + + rds = [] + for r in data.get('roads', []): + owner_id = r.get('player', 1) - 1 # ×”×ž×Ø×” מ-1-based ל-0-based + owner = pid_to_name.get(owner_id, "?") + rds.append([[r['from'], r['to']], owner]) + + # ×”×ž×Ø×Ŗ ID של השחקן הנוכחי לשם + curr_id = data.get('current_player') + curr_name = pid_to_name.get(curr_id, str(curr_id) if curr_id is not None else None) + + # החזרת המילון המעובד + return { + "meta": { + "curr": curr_name, + "phase": data.get('current_phase'), + "robber": robber_hex, + "dice": data.get('dice_result') + }, + "H": hex_array, + "N": nodes_array, + "state": {"bld": bld, "rds": rds}, + "players": players + } + + +def format_with_legend(optimized_state: Dict[str, Any]) -> str: + """ + Format optimized state with explanatory legend for LLM. + + Args: + optimized_state: Output from optimize_state_for_ai + + Returns: + Formatted string with legend + JSON + """ + import json + + legend = """1. LOOKUP TABLES: + • "H" (Hexes): Array where Index = HexID. Value = Resource+Num. + Example: H[1]="W12" -> Hex 1 is Wood 12. + • "N" (Nodes): Array where Index = NodeID. + Format: [ [Neighbors], [HexIDs], Port? ] + Logic: To find yield of Node 10, check N[10]. Get HexIDs (e.g. [1,5]). Look up H[1] and H[5]. + +2. CODES: W=Wood, B=Brick, S=Sheep, Wh=Wheat, O=Ore, D=Desert. + ?3=Any 3:1 port, X2=Specific Resource 2:1 port. + +3. STATE: "bld"=[NodeID, Owner, Type], "rds"=[[From,To], Owner]. + +4. PLAYERS: "res"={Resource:Count}, "dev"={"h":[Hidden Cards], "r":[Revealed] (K=Knight)}, + "stat"=["LR" (Longest Road), "LA" (Largest Army)]. + +5. ROBBER: Located at HexID specified in "meta.robber". H[id] is blocked. + +JSON: +""" + + sections = [ + f'"meta":{json.dumps(optimized_state["meta"], separators=(",", ":"))}', + f'"H":{json.dumps(optimized_state["H"], separators=(",", ":"))}', + f'"N":{json.dumps(optimized_state["N"], separators=(",", ":"))}', + f'"state":{json.dumps(optimized_state["state"], separators=(",", ":"))}', + f'"players":{json.dumps(optimized_state["players"], separators=(",", ":"))}' + ] + json_content = "{\n " + ",\n ".join(sections) + "\n}" + + return legend + json_content diff --git a/pycatan/core/game.py b/pycatan/core/game.py index cee080ade7875df8ab1eb72329d73cd3b482afbc..db75b76b0bf7af2df32bd8a6b0da4b4eb0823913 100644 --- a/pycatan/core/game.py +++ b/pycatan/core/game.py @@ -402,7 +402,8 @@ class Game: robber_position=tuple(self._get_robber_position()), harbors=self._get_ports_info(), buildings=self._get_all_buildings(), - roads=self._get_all_roads() + roads=self._get_all_roads(), + points=self._get_points_info() # Add points for AI optimization ) # Create and return game state @@ -543,3 +544,67 @@ class Game: }) return roads + def _get_points_info(self): + """ + Get information about all points/nodes on the board. + + Returns info needed for AI optimization: neighbors, adjacent hexes, ports. + """ + points = [] + + for point_row in self.board.points: + for point in point_row: + if point: + # Get point ID + point_id = board_definition.game_coords_to_point_id(point.position[0], point.position[1]) + + if point_id: + # Get neighbor node IDs + neighbors = [] + if hasattr(point, 'neighbors'): + for neighbor in point.neighbors: + if neighbor: + neighbor_id = board_definition.game_coords_to_point_id( + neighbor.position[0], neighbor.position[1] + ) + if neighbor_id: + neighbors.append(neighbor_id) + + # Get adjacent hex IDs + hex_ids = [] + if hasattr(point, 'tiles'): + for tile in point.tiles: + if tile: + hex_id = board_definition.game_coords_to_hex_id( + tile.position[0], tile.position[1] + ) + if hex_id: + hex_ids.append(hex_id) + + # Check if point has a port + port_info = None + for harbor in self.board.harbors: + if harbor: + point_one_coords = harbor.point_one.position if hasattr(harbor.point_one, 'position') else None + point_two_coords = harbor.point_two.position if hasattr(harbor.point_two, 'position') else None + + if (point_one_coords == point.position or point_two_coords == point.position): + # This point has a port + ratio = 2 if harbor.type.name.lower() != 'any' else 3 + port_info = { + 'type': harbor.type.name.lower(), + 'ratio': ratio + } + break + + point_info = { + 'id': point_id, + 'position': point.position, + 'neighbors': neighbors, + 'hexes': hex_ids, + 'port': port_info + } + points.append(point_info) + + return points + diff --git a/pycatan/management/actions.py b/pycatan/management/actions.py index 9eb7c87ad160d9b0b93202050ee3d03324b5214d..f52432ba939a583b0c3c9c94e6577714b966e360 100644 --- a/pycatan/management/actions.py +++ b/pycatan/management/actions.py @@ -131,6 +131,7 @@ class BoardState: harbors: List[Dict[str, Any]] # Harbor information buildings: Dict[tuple, Dict[str, Any]] # Point -> building info roads: List[tuple] # All roads on board + points: List[Dict[str, Any]] = field(default_factory=list) # Node/Point information for AI @dataclass