SanchoGGP / ggp-base

The General Game Playing Base Package
8 stars 4 forks source link

Complete draw turns into a loss against random! #396

Open arr28 opened 8 years ago

arr28 commented 8 years ago

Playing a new game by Ed, Sancho lost against Random on its first outing. Made more alarming by the fact that it basically knew the game was a draw from the start.

19:30:32.854 - ======================================================
19:30:32.856 - Beginning new game: Base.ttt10pie.1473359432764
19:30:32.856 - Logs available at:  http://localhost:9199/localview/Base.ttt10pie.1473359432764
19:30:34.636 ? Unrecognised game.  Created new game directory: C:\Personal\Projects\GGP\ggp-base\data\games\1473359434635
19:30:34.636 ? Unrecognised game.  Created new game directory: C:\Personal\Projects\GGP\ggp-base\data\games\1473359434635
19:30:34.639 ? Failed to write to file: java.io.FileNotFoundException: data\games\1473359434635\gdl.txt (The requested operation cannot be performed on a file with a user-mapped section open)
Failed to write to file: java.io.FileNotFoundException: data\games\1473359434635\gdl.txt (The requested operation cannot be performed on a file with a user-mapped section open)
19:30:34.741 - Starting watchdog with interval 600000ms
19:30:35.166 - Filler move set: [( does player1 noop )]
19:30:35.191 - Performing factor analysis
19:30:35.197 - Control set: [( true ( control player1 ) )(false), ( true ( control player2 ) )(false), ( true ( piecount 0 ) )(false)]
19:30:35.225 - Reducing with respect to XSentence: ( true ( control player2 ) )
19:30:35.258 - Num components in goal-less X-net: 230
19:30:35.258 - Num components in goal-less O-net: 230
19:30:35.258 - Num components in goal net:        76
19:30:35.258 - Num components in terminality net: 55
19:30:35.264 - This is Sancho 1.61d with last commit 040e4f2dd4bc954bf8e5987e9352286cd9a8dbb6
19:30:35.264 - Running with machine-specific properties:
19:30:35.264 -  SAFETY_MARGIN = 5000 (default: 2500)
19:30:35.264 -  CREATING_DATABASE = false (default: false)
19:30:35.264 -  WC_LOCATION = C:/Personal/Projects/GGP/ggp-base (default: null)
19:30:35.265 -  CPU_INTENSIVE_THREADS = 4 (default: -1)
19:30:35.265 -  USE_AFFINITY = false (default: true)
19:30:35.293 - Start clock: 30s
19:30:35.293 - Play clock:  15s
19:30:35.293 - We are:      player1
19:30:35.339 - Latch analysis results
19:30:35.339 -   33 positive base latches: ( ( true ( cell 1 1 o ) ), ( true ( cell 1 1 x ) ), ( true ( cell 1 2 o ) ), ( true ( cell 1 2 x ) ), ( true ( cell 1 3 o ) ), ( true ( cell 1 3 x ) ), ( true ( cell 2 1 o ) ), ( true ( cell 2 1 x ) ), ( true ( cell 2 2 o ) ), ( true ( cell 2 2 x ) ), ( true ( cell 2 3 o ) ), ( true ( cell 2 3 x ) ), ( true ( cell 3 1 o ) ), ( true ( cell 3 1 x ) ), ( true ( cell 3 2 o ) ), ( true ( cell 3 2 x ) ), ( true ( cell 3 3 o ) ), ( true ( cell 3 3 x ) ), ( true ( piecount 0 ) ), ( true ( piecount 1 ) ), ( true ( piecount 10 ) ), ( true ( piecount 2 ) ), ( true ( piecount 3 ) ), ( true ( piecount 4 ) ), ( true ( piecount 5 ) ), ( true ( piecount 6 ) ), ( true ( piecount 7 ) ), ( true ( piecount 8 ) ), ( true ( piecount 9 ) ), ( true ( usingMarker player1 o ) ), ( true ( usingMarker player1 x ) ), ( true ( usingMarker player2 o ) ), ( true ( usingMarker player2 x ) ) )
19:30:35.339 -   10 negative base latches: ( ( true ( cell 1 1 b ) ), ( true ( cell 1 2 b ) ), ( true ( cell 1 3 b ) ), ( true ( cell 2 1 b ) ), ( true ( cell 2 2 b ) ), ( true ( cell 2 3 b ) ), ( true ( cell 3 1 b ) ), ( true ( cell 3 2 b ) ), ( true ( cell 3 3 b ) ), ( true ( piecount 0 ) ) )
19:30:35.339 -   0 simple positive goal latches
19:30:35.339 -   0 simple negative goal latches
19:30:35.339 -   0 complex positive goal latches
19:30:35.339 -   Not all roles have positive goal latches
19:30:35.342 - Not suitable for PayoffMatrixGamePlayer: Can't prove that the game is fixed length
19:30:47.533 - No heuristics enabled
19:30:47.533 - Performed 408554 simulations to calculate heuristics
19:30:47.533 - Role 0 has control prop: ( true ( control player1 ) )
19:30:47.533 - Role 1 has control prop: ( true ( control player2 ) )
19:30:57.533 - branchingFactorApproximation = 6.818075456365621, averageBranchingFactor = 2.7860059801514736, choices high water mark = 7
19:30:57.533 - Did 515706 simulations for game characteristics
19:30:57.533 - Fixed characteristics
19:30:57.533 -   Game is not a simultaneous turn game
19:30:57.533 -   Is 2 player game
19:30:57.533 - Statistical characteristics
19:30:57.533 -   Range of lengths of sample games seen:          [13,19]
19:30:57.533 -   Average num turns:                              16.31134018219603
19:30:57.533 -   Std deviation num turns:                        1.4837076623883652
19:30:57.533 -   Average num turns for non-drawn result:         16.258829599843423
19:30:57.533 -   Average hyper-sequence length:                  1.0
19:30:57.533 -   Variance in hyper-sequence length:              0.0
19:30:57.533 -   Goals stability:                                0.7392976224897414
19:30:57.533 -   Proportion of max length games ending in draws: 0.08584537578533008
19:30:57.533 -   Num factors:                                    1
19:30:57.533 -   Max factor failure time (ms)                    0
19:30:57.533 -   IsFixedSum                                      true
19:30:57.533 - Measured goal volatility is 0.005412449157579136 [monotonic]
19:30:57.533 - Using advanced heuristic mechanism
19:30:57.533 - Set explorationBias range to [0.96, 1.44]
19:30:57.533 - Greedy rollout terminal discovery effectiveness: 9.279736766796024E-4
19:30:57.533 - Num terminal props seen: 9 out of 44
19:30:57.533 - Estimated greedy rollout cost: 2.785980126749347
19:30:57.537 - Min raw score = 0, max = 100
19:30:57.537 - multiRoleAverageScoreDiff = 0
19:30:57.537 - Not using RAVE
19:30:57.537 - Performed 1952452 simulations in 10000ms
19:30:57.537 - 195245 simulations/second performed - setting rollout sample size to 5
19:30:59.715 - Iterations in 1089 ms with/without removal before adding: 124499/120416
19:30:59.715 - Speed improvement insufficient to justify 2-pass prop setting
19:30:59.720 - Not using greedy rollouts
19:30:59.726 - Hyper expansion processing is not enabled
19:30:59.726 - Weight decay disabled
19:30:59.726 - Expand-after-visits threshold set to 0
19:30:59.726 - Using periodic node score normalization
19:30:59.726 - Using UCB-tuned
19:30:59.726 - Early cutoff disabled
19:30:59.726 - Mixi-max selection disabled
19:30:59.799 - This game is not suitable for local search
19:30:59.805 - Not using RAVE
19:30:59.805 - MCTS iterations last turn = 0
19:30:59.805 - Encountered childless root - must re-expand
19:30:59.805 - Root has 10 children, and is not complete
19:30:59.805 - Ready to play
19:30:59.805 - Move search started
19:30:59.805 - Starting sample size update timer
19:31:00.187 - > > > > > Starting turn 1 < < < < <
19:31:00.214 - MCTS iterations last turn = 1369
19:31:00.214 - Root has 10 children, and is not complete
19:31:10.187 - Average fringe depth: 21.960558097519414
19:31:10.187 - Fringe depth variability: 0.03679719747971028
19:31:10.187 - Average branching factor: 3.583458414029258
19:31:10.187 - Tree aspect ratio: 2.4291893696670903
19:31:10.198 - Move swap scores 0.21 (selectionScore 0.18, selection count 2314 [edge 2314, updates 5754.0], ref 1)
19:31:10.201 - Move ( mark 1 1 ) scores 50.00 (selectionScore 49.93, selection count 192682 [edge 192682, updates 420340.0], ref 22, complete [10])
19:31:10.201 - Move ( mark 1 2 ) scores 1.45 (selectionScore 1.28, selection count 3653 [edge 3653, updates 13553.0], ref 18)
19:31:10.201 - Move ( mark 1 3 ) scores 50.00 (selectionScore 49.93, selection count 164715 [edge 164715, updates 359498.0], ref 10, complete [10])
19:31:10.201 - Move ( mark 2 1 ) scores 50.00 (selectionScore 49.93, selection count 112091 [edge 112091, updates 235844.0], ref 24, complete [10])
19:31:10.201 - Move ( mark 2 2 ) scores 1.49 (selectionScore 1.32, selection count 3727 [edge 3727, updates 13197.0], ref 6)
19:31:10.202 - Move ( mark 2 3 ) scores 49.90 (selectionScore 47.15, selection count 48853 [edge 48853, updates 120241.0], ref 26)
19:31:10.202 - Move ( mark 3 1 ) scores 1.45 (selectionScore 1.29, selection count 3659 [edge 3659, updates 13371.0], ref 12)
19:31:10.202 - Move ( mark 3 2 ) scores 50.00 (selectionScore 49.93, selection count 129573 [edge 129573, updates 276114.0], ref 15, complete [10])
19:31:10.203 - Move ( mark 3 3 ) scores 1.54 (selectionScore 1.37, selection count 3804 [edge 3804, updates 13988.0], ref 23)
19:31:10.203 - 1 level minimax result differed from best raw move: org.ggp.base.player.gamer.statemachine.sancho.TreeEdge@69fb1df8
19:31:10.203 - Most likely path: ( mark 1 1 ), ( mark 2 1 ) | ( mark 2 2 ), ( mark 1 3 ) | ( mark 2 3 ), ( mark 1 2 ) | ( mark 3 2 ), ( mark 3 3 ) | swap, swap | swap, swap | swap, swap | swap, swap | swap, swap 
19:31:10.203 - Best move was ( mark 1 1 ), scoring 50.00
19:31:10.203 - Num nodes in use: 102577
19:31:10.203 - Num true rollouts added: 1067628
19:31:10.203 - Num terminal nodes revisited: 439463
19:31:10.203 - Num incomplete nodes: 0
19:31:10.203 - Num completely explored branches: 97112
19:31:10.203 - Current observed rollout score range: [0, 50]
19:31:10.203 - Playing move: ( mark 1 1 )
19:31:10.337 - Moves played for turn 1: [( mark 1 1 ), noop]
19:31:10.337 - Non-null move last turn was: ( mark 1 1 )
19:31:10.337 - > > > > > Starting turn 2 < < < < <
19:31:10.338 - MCTS iterations last turn = 976599
19:31:10.338 - Freeing redundant state
19:31:10.354 - Sweep complete, beginning delete...
19:31:10.489 - Freed 94% of allocated nodes (96466 of 102578)
19:31:10.489 - Root has 1 children, and is not complete
19:31:10.489 - Mark root complete
19:31:10.489 - Move search complete: mTerminateRequested = false, complete = true
19:31:10.489 - Move search started
19:31:10.489 - Move search complete: mTerminateRequested = false, complete = true
19:31:10.739 - Early search termination because root is complete
19:31:10.739 - Move noop scores 50.00 (selectionScore 49.97, selection count 519240 [edge 519240, updates 420340.0], ref 22, complete [9])
19:31:10.739 - Most likely path: noop, ( mark 2 1 ) | ( mark 2 2 ), ( mark 1 3 ) | ( mark 2 3 ), ( mark 1 2 ) | ( mark 3 2 ), ( mark 3 3 ) | swap, swap | swap, swap | swap, swap | swap, swap | swap, swap 
19:31:10.739 - Best move was noop, scoring 50.00
19:31:10.739 - Num nodes in use: 6112
19:31:10.739 - Num true rollouts added: 0
19:31:10.739 - Num terminal nodes revisited: 326558
19:31:10.739 - Num incomplete nodes: 0
19:31:10.739 - Num completely explored branches: 6113
19:31:10.739 - Current observed rollout score range: [1000, -100]
19:31:10.739 - Playing move: noop
19:31:10.814 - Moves played for turn 2: [noop, ( mark 3 1 )]
19:31:10.814 - Non-null move last turn was: ( mark 3 1 )
19:31:10.814 - > > > > > Starting turn 3 < < < < <
19:31:10.814 - MCTS iterations last turn = 1
19:31:10.814 - Freeing redundant state
19:31:10.814 - Sweep complete, beginning delete...
19:31:10.819 - Freed 86% of allocated nodes (5282 of 6112)
19:31:10.819 - Root has 8 children, and is complete
19:31:10.819 - Early search termination because root is complete
19:31:10.819 - Unexpanded child of complete root for move: swap
19:31:10.819 - Move ( mark 1 3 ) scores 50.00 (selectionScore 49.11, selection count 11293 [edge 4815, updates 9598.0], ref 579, complete [9])
19:31:10.819 - Unexpanded child of complete root for move: ( mark 2 1 )
19:31:10.819 - Unexpanded child of complete root for move: ( mark 2 2 )
19:31:10.819 - Unexpanded child of complete root for move: ( mark 3 3 )
19:31:10.819 - Unexpanded child of complete root for move: ( mark 3 2 )
19:31:10.819 - Unexpanded child of complete root for move: ( mark 1 2 )
19:31:10.819 - Unexpanded child of complete root for move: ( mark 2 3 )
19:31:10.819 - Most likely path: ( mark 1 3 ), ( mark 1 2 ) | ( mark 2 2 ), ( mark 2 3 ) | ( mark 2 1 ), ( mark 3 3 ) | ( mark 3 2 )
19:31:10.819 - Best move was ( mark 1 3 ), scoring 50.00
19:31:10.819 - Num nodes in use: 830
19:31:10.819 - Num true rollouts added: 0
19:31:10.819 - Num terminal nodes revisited: 0
19:31:10.819 - Num incomplete nodes: 0
19:31:10.819 - Num completely explored branches: 831
19:31:10.819 - Current observed rollout score range: [1000, -100]
19:31:10.819 - Playing move: ( mark 1 3 )
19:31:10.821 - Move search started
19:31:10.821 - Move search complete: mTerminateRequested = false, complete = true
19:31:10.859 - Moves played for turn 3: [( mark 1 3 ), noop]
19:31:10.859 - Non-null move last turn was: ( mark 1 3 )
19:31:10.859 - > > > > > Starting turn 4 < < < < <
19:31:10.859 - MCTS iterations last turn = 0
19:31:10.859 - Freeing redundant state
19:31:10.860 - Sweep complete, beginning delete...
19:31:10.860 - Freed 0% of allocated nodes (1 of 831)
19:31:10.860 - Root has 1 children, and is not complete
19:31:10.860 - Move search started
19:31:10.860 - Mark root complete
19:31:10.860 - Move search complete: mTerminateRequested = false, complete = true
19:31:11.110 - Early search termination because root is complete
19:31:11.110 - Move noop scores 50.00 (selectionScore 49.19, selection count 11294 [edge 11294, updates 9598.0], ref 579, complete [8])
19:31:11.110 - Most likely path: noop, ( mark 1 2 ) | ( mark 2 2 ), ( mark 2 3 ) | ( mark 2 1 ), ( mark 3 3 ) | ( mark 3 2 )
19:31:11.110 - Best move was noop, scoring 50.00
19:31:11.110 - Num nodes in use: 830
19:31:11.110 - Num true rollouts added: 0
19:31:11.110 - Num terminal nodes revisited: 1
19:31:11.110 - Num incomplete nodes: 0
19:31:11.110 - Num completely explored branches: 832
19:31:11.110 - Current observed rollout score range: [1000, -100]
19:31:11.110 - Playing move: noop
19:31:11.132 - Moves played for turn 4: [noop, ( mark 3 2 )]
19:31:11.132 - Non-null move last turn was: ( mark 3 2 )
19:31:11.132 - > > > > > Starting turn 5 < < < < <
19:31:11.132 - MCTS iterations last turn = 1
19:31:11.132 - Freeing redundant state
19:31:11.132 - Sweep complete, beginning delete...
19:31:11.137 - Freed 90% of allocated nodes (752 of 830)
19:31:11.137 - Root has 6 children, and is complete
19:31:11.137 - Early search termination because root is complete
19:31:11.137 - Move swap scores 1.92 (selectionScore 1.33, selection count 262 [edge 262, updates 582.0], ref 776, complete [7])
19:31:11.137 - Unexpanded child of complete root for move: ( mark 2 2 )
19:31:11.137 - Unexpanded child of complete root for move: ( mark 2 1 )
19:31:11.137 - Unexpanded child of complete root for move: ( mark 2 3 )
19:31:11.137 - Unexpanded child of complete root for move: ( mark 1 2 )
19:31:11.137 - Unexpanded child of complete root for move: ( mark 3 3 )
19:31:11.137 - Most likely path: swap, swap | swap, swap | swap, swap | swap, swap | swap, ( mark 1 2 ) 
19:31:11.137 - Best move was swap, scoring 1.92
19:31:11.137 - Num nodes in use: 78
19:31:11.137 - Num true rollouts added: 0
19:31:11.137 - Num terminal nodes revisited: 0
19:31:11.137 - Num incomplete nodes: 0
19:31:11.137 - Num completely explored branches: 80
19:31:11.137 - Current observed rollout score range: [1000, -100]
19:31:11.138 - Playing move: swap
19:31:11.147 - Move search started
19:31:11.147 - Move search complete: mTerminateRequested = false, complete = true
19:31:11.251 - Moves played for turn 5: [swap, noop]
19:31:11.251 - Non-null move last turn was: swap
19:31:11.251 - > > > > > Starting turn 6 < < < < <
19:31:11.252 - MCTS iterations last turn = 0
19:31:11.252 - Freeing redundant state
19:31:11.252 - Sweep complete, beginning delete...
19:31:11.252 - Freed 1% of allocated nodes (1 of 79)
19:31:11.252 - Root has 1 children, and is not complete
19:31:11.252 - Move search started
19:31:11.252 - Mark root complete
19:31:11.252 - Move search complete: mTerminateRequested = false, complete = true
19:31:11.502 - Early search termination because root is complete
19:31:11.502 - Move noop scores 1.92 (selectionScore 1.35, selection count 263 [edge 263, updates 582.0], ref 776, complete [6])
19:31:11.502 - Most likely path: noop, swap | swap, swap | swap, swap | swap, swap | swap, ( mark 1 2 ) 
19:31:11.502 - Best move was noop, scoring 1.92
19:31:11.502 - Num nodes in use: 78
19:31:11.502 - Num true rollouts added: 0
19:31:11.502 - Num terminal nodes revisited: 1
19:31:11.502 - Num incomplete nodes: 0
19:31:11.502 - Num completely explored branches: 81
19:31:11.502 - Current observed rollout score range: [1000, -100]
19:31:11.502 - Playing move: noop
19:31:11.531 - Moves played for turn 6: [noop, ( mark 2 2 )]
19:31:11.531 - Non-null move last turn was: ( mark 2 2 )
19:31:11.531 - > > > > > Starting turn 7 < < < < <
19:31:11.531 - MCTS iterations last turn = 1
19:31:11.531 - Freeing redundant state
19:31:11.531 - Sweep complete, beginning delete...
19:31:11.531 - Freed 64% of allocated nodes (50 of 78)
19:31:11.531 - Root has 5 children, and is complete
19:31:11.531 - Early search termination because root is complete
19:31:11.531 - Move swap scores 1.92 (selectionScore 0.73, selection count 47 [edge 29, updates 97.0], ref 25769852670, complete [6])
19:31:11.531 - Unexpanded child of complete root for move: ( mark 2 1 )
19:31:11.531 - Unexpanded child of complete root for move: ( mark 2 3 )
19:31:11.531 - Unexpanded child of complete root for move: ( mark 1 2 )
19:31:11.531 - Unexpanded child of complete root for move: ( mark 3 3 )
19:31:11.531 - Most likely path: swap, swap | swap, ( mark 2 3 ) | swap, swap | swap, swap | ( mark 2 1 )
19:31:11.531 - Best move was swap, scoring 1.92
19:31:11.531 - Num nodes in use: 28
19:31:11.531 - Num true rollouts added: 0
19:31:11.531 - Num terminal nodes revisited: 0
19:31:11.531 - Num incomplete nodes: 0
19:31:11.531 - Num completely explored branches: 31
19:31:11.531 - Current observed rollout score range: [1000, -100]
19:31:11.531 - Playing move: swap
19:31:11.543 - Move search started
19:31:11.543 - Move search complete: mTerminateRequested = false, complete = true
19:31:11.837 - Moves played for turn 7: [swap, noop]
19:31:11.837 - Non-null move last turn was: swap
19:31:11.837 - > > > > > Starting turn 8 < < < < <
19:31:11.837 - MCTS iterations last turn = 0
19:31:11.837 - Freeing redundant state
19:31:11.837 - Sweep complete, beginning delete...
19:31:11.837 - Freed 3% of allocated nodes (1 of 29)
19:31:11.837 - Root has 1 children, and is not complete
19:31:11.837 - Move search started
19:31:11.837 - Mark root complete
19:31:11.837 - Move search complete: mTerminateRequested = false, complete = true
19:31:12.087 - Early search termination because root is complete
19:31:12.087 - Move noop scores 1.92 (selectionScore 0.74, selection count 48 [edge 48, updates 97.0], ref 25769852670, complete [5])
19:31:12.087 - Most likely path: noop, ( mark 2 3 ) | swap, swap | swap, swap | swap, swap | ( mark 2 1 )
19:31:12.087 - Best move was noop, scoring 1.92
19:31:12.087 - Num nodes in use: 28
19:31:12.087 - Num true rollouts added: 0
19:31:12.087 - Num terminal nodes revisited: 1
19:31:12.087 - Num incomplete nodes: 0
19:31:12.087 - Num completely explored branches: 32
19:31:12.087 - Current observed rollout score range: [1000, -100]
19:31:12.087 - Playing move: noop
19:31:12.109 - Moves played for turn 8: [noop, ( mark 3 3 )]
19:31:12.109 - Non-null move last turn was: ( mark 3 3 )
19:31:12.109 - > > > > > Starting turn 9 < < < < <
19:31:12.109 - MCTS iterations last turn = 1
19:31:12.109 - Mark root complete
19:31:12.109 - Freeing redundant state
19:31:12.109 - Sweep complete, beginning delete...
19:31:12.109 - Freed 93% of allocated nodes (27 of 29)
19:31:12.109 - Root has 1 children, and is complete
19:31:12.109 - Early search termination because root is complete
19:31:12.109 - Move swap scores 1.92 (selectionScore 0.64, selection count 36 [edge 36, updates 0.0], ref 17405, complete [8])
19:31:12.109 - Most likely path: swap
19:31:12.109 - Best move was swap, scoring 1.92
19:31:12.109 - Num nodes in use: 2
19:31:12.109 - Num true rollouts added: 0
19:31:12.109 - Num terminal nodes revisited: 0
19:31:12.109 - Num incomplete nodes: 0
19:31:12.109 - Num completely explored branches: 6
19:31:12.109 - Current observed rollout score range: [1000, -100]
19:31:12.109 - Playing move: swap
19:31:12.110 - Move search started
19:31:12.110 - Move search complete: mTerminateRequested = false, complete = true
19:31:12.300 - Moves played for turn 9: [swap, noop]
19:31:12.300 - Non-null move last turn was: swap
19:31:12.300 - > > > > > Starting turn 10 < < < < <
19:31:12.300 - MCTS iterations last turn = 0
19:31:12.301 - Mark root complete
19:31:12.301 - Freeing redundant state
19:31:12.301 - Sweep complete, beginning delete...
19:31:12.301 - Freed 33% of allocated nodes (1 of 3)
19:31:12.301 - Root has 1 children, and is complete
19:31:12.301 - Early search termination because root is complete
19:31:12.301 - Move noop scores 1.92 (selectionScore 0.64, selection count 36 [edge 36, updates 0.0], ref 17405, complete [7])
19:31:12.301 - Most likely path: noop
19:31:12.301 - Best move was noop, scoring 1.92
19:31:12.301 - Num nodes in use: 2
19:31:12.301 - Num true rollouts added: 0
19:31:12.301 - Num terminal nodes revisited: 0
19:31:12.301 - Num incomplete nodes: 0
19:31:12.301 - Num completely explored branches: 6
19:31:12.301 - Current observed rollout score range: [1000, -100]
19:31:12.301 - Playing move: noop
19:31:12.304 - Move search started
19:31:12.304 - Move search complete: mTerminateRequested = false, complete = true
19:31:12.343 - Moves played for turn 10: [noop, swap]
19:31:12.343 - Non-null move last turn was: swap
19:31:12.343 - > > > > > Starting turn 11 < < < < <
19:31:12.343 - MCTS iterations last turn = 0
19:31:12.343 - Mark root complete
19:31:12.343 - Freeing redundant state
19:31:12.343 - Sweep complete, beginning delete...
19:31:12.343 - Freed 33% of allocated nodes (1 of 3)
19:31:12.343 - Root has 1 children, and is complete
19:31:12.343 - Early search termination because root is complete
19:31:12.343 - Move swap scores 1.92 (selectionScore 0.64, selection count 36 [edge 36, updates 0.0], ref 17405, complete [6])
19:31:12.343 - Most likely path: swap
19:31:12.343 - Best move was swap, scoring 1.92
19:31:12.343 - Num nodes in use: 2
19:31:12.343 - Num true rollouts added: 0
19:31:12.343 - Num terminal nodes revisited: 0
19:31:12.343 - Num incomplete nodes: 0
19:31:12.343 - Num completely explored branches: 6
19:31:12.343 - Current observed rollout score range: [1000, -100]
19:31:12.343 - Playing move: swap
19:31:12.343 - Move search started
19:31:12.343 - Move search complete: mTerminateRequested = false, complete = true
19:31:12.359 - Moves played for turn 11: [swap, noop]
19:31:12.359 - Non-null move last turn was: swap
19:31:12.359 - > > > > > Starting turn 12 < < < < <
19:31:12.359 - MCTS iterations last turn = 0
19:31:12.360 - Mark root complete
19:31:12.360 - Freeing redundant state
19:31:12.360 - Sweep complete, beginning delete...
19:31:12.360 - Freed 33% of allocated nodes (1 of 3)
19:31:12.360 - Root has 1 children, and is complete
19:31:12.360 - Early search termination because root is complete
19:31:12.360 - Move noop scores 1.92 (selectionScore 0.64, selection count 36 [edge 36, updates 0.0], ref 17405, complete [5])
19:31:12.360 - Most likely path: noop
19:31:12.360 - Best move was noop, scoring 1.92
19:31:12.360 - Num nodes in use: 2
19:31:12.360 - Num true rollouts added: 0
19:31:12.360 - Num terminal nodes revisited: 0
19:31:12.360 - Num incomplete nodes: 0
19:31:12.360 - Num completely explored branches: 6
19:31:12.360 - Current observed rollout score range: [1000, -100]
19:31:12.360 - Playing move: noop
19:31:12.360 - Move search started
19:31:12.360 - Move search complete: mTerminateRequested = false, complete = true
19:31:12.391 - Moves played for turn 12: [noop, swap]
19:31:12.391 - Non-null move last turn was: swap
19:31:12.391 - > > > > > Starting turn 13 < < < < <
19:31:12.391 - MCTS iterations last turn = 0
19:31:12.391 - Mark root complete
19:31:12.391 - Freeing redundant state
19:31:12.391 - Sweep complete, beginning delete...
19:31:12.391 - Freed 33% of allocated nodes (1 of 3)
19:31:12.391 - Root has 1 children, and is complete
19:31:12.391 - Early search termination because root is complete
19:31:12.391 - Move swap scores 1.92 (selectionScore 0.64, selection count 36 [edge 36, updates 0.0], ref 17405, complete [4])
19:31:12.391 - Most likely path: swap
19:31:12.391 - Best move was swap, scoring 1.92
19:31:12.391 - Num nodes in use: 2
19:31:12.391 - Num true rollouts added: 0
19:31:12.391 - Num terminal nodes revisited: 0
19:31:12.391 - Num incomplete nodes: 0
19:31:12.391 - Num completely explored branches: 6
19:31:12.392 - Current observed rollout score range: [1000, -100]
19:31:12.392 - Playing move: swap
19:31:12.393 - Move search started
19:31:12.393 - Move search complete: mTerminateRequested = false, complete = true
19:31:12.446 - Moves played for turn 13: [swap, noop]
19:31:12.446 - Non-null move last turn was: swap
19:31:12.446 - > > > > > Starting turn 14 < < < < <
19:31:12.446 - MCTS iterations last turn = 0
19:31:12.446 - Mark root complete
19:31:12.446 - Freeing redundant state
19:31:12.446 - Sweep complete, beginning delete...
19:31:12.446 - Freed 33% of allocated nodes (1 of 3)
19:31:12.446 - Root has 1 children, and is complete
19:31:12.446 - Early search termination because root is complete
19:31:12.446 - Move noop scores 1.92 (selectionScore 0.64, selection count 36 [edge 36, updates 0.0], ref 17405, complete [3])
19:31:12.446 - Most likely path: noop
19:31:12.446 - Best move was noop, scoring 1.92
19:31:12.446 - Num nodes in use: 2
19:31:12.446 - Num true rollouts added: 0
19:31:12.446 - Num terminal nodes revisited: 0
19:31:12.446 - Num incomplete nodes: 0
19:31:12.446 - Num completely explored branches: 6
19:31:12.446 - Current observed rollout score range: [1000, -100]
19:31:12.446 - Playing move: noop
19:31:12.447 - Move search started
19:31:12.447 - Move search complete: mTerminateRequested = false, complete = true
19:31:12.492 - Moves played for turn 14: [noop, swap]
19:31:12.492 - Non-null move last turn was: swap
19:31:12.492 - > > > > > Starting turn 15 < < < < <
19:31:12.492 - MCTS iterations last turn = 0
19:31:12.492 - Mark root complete
19:31:12.492 - Freeing redundant state
19:31:12.492 - Sweep complete, beginning delete...
19:31:12.492 - Freed 33% of allocated nodes (1 of 3)
19:31:12.492 - Root has 1 children, and is complete
19:31:12.492 - Early search termination because root is complete
19:31:12.492 - Move swap scores 1.92 (selectionScore 0.64, selection count 36 [edge 36, updates 0.0], ref 17405, complete [2])
19:31:12.492 - Most likely path: swap
19:31:12.492 - Best move was swap, scoring 1.92
19:31:12.492 - Num nodes in use: 2
19:31:12.492 - Num true rollouts added: 0
19:31:12.492 - Num terminal nodes revisited: 0
19:31:12.492 - Num incomplete nodes: 0
19:31:12.492 - Num completely explored branches: 6
19:31:12.492 - Current observed rollout score range: [1000, -100]
19:31:12.492 - Playing move: swap
19:31:12.497 - Move search started
19:31:12.497 - Move search complete: mTerminateRequested = false, complete = true
19:31:12.764 - Moves played for turn 15: [swap, noop]
19:31:12.764 - Non-null move last turn was: swap
19:31:12.764 - > > > > > Starting turn 16 < < < < <
19:31:12.764 - MCTS iterations last turn = 0
19:31:12.764 - Mark root complete
19:31:12.764 - Freeing redundant state
19:31:12.764 - Sweep complete, beginning delete...
19:31:12.764 - Freed 33% of allocated nodes (1 of 3)
19:31:12.764 - Root has 1 children, and is complete
19:31:12.764 - Early search termination because root is complete
19:31:12.764 - Move noop scores 1.92 (selectionScore 0.64, selection count 36 [edge 36, updates 0.0], ref 17405, complete [1])
19:31:12.764 - Most likely path: noop
19:31:12.764 - Best move was noop, scoring 1.92
19:31:12.764 - Num nodes in use: 2
19:31:12.764 - Num true rollouts added: 0
19:31:12.764 - Num terminal nodes revisited: 0
19:31:12.764 - Num incomplete nodes: 0
19:31:12.764 - Num completely explored branches: 6
19:31:12.764 - Current observed rollout score range: [1000, -100]
19:31:12.764 - Playing move: noop
19:31:12.766 - Move search started
19:31:12.766 - Move search complete: mTerminateRequested = false, complete = true
19:31:12.823 - Final score: 0
19:31:12.823 - Stop rollout processors
19:31:12.828 - Finished stopping rollout processors
19:31:12.901 - Terminating GameSearcher (mTerminateRequested = true)
19:31:17.903 - Tlkio thread terminated
19:31:17.903 - Stop the watchdog
19:31:17.903 - Watchdog terminated
19:31:21.088 - Tidy-up complete
arr28 commented 8 years ago

And here's the KIF. This is a game of TTT with 10 "pies". Quirk is that the game isn't over until all 10 pies have been used.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Tictactoe with pies
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Roles
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(role player1)
(role player2)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Base & Input
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(index 1) (index 2) (index 3)
(marker x) (marker o)

(<= (base (cell ?x ?y b)) (index ?x) (index ?y))
(<= (base (cell ?x ?y x)) (index ?x) (index ?y))
(<= (base (cell ?x ?y o)) (index ?x) (index ?y))
(<= (base (control ?p)) (role ?p))
(base (piecount 0))
(<= (base (piecount ?np1))
    (succ ?n ?np1))

(base debuglinex)
(base debuglineo)

(<= (base (usingMarker ?r ?m))
    (role ?r)
    (marker ?m))

(<= (input ?p (mark ?x ?y)) (index ?x) (index ?y) (role ?p))
(<= (input ?p noop) (role ?p))
(<= (input ?p swap) (role ?p))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Initial State
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(init (cell 1 1 b))
(init (cell 1 2 b))
(init (cell 1 3 b))
(init (cell 2 1 b))
(init (cell 2 2 b))
(init (cell 2 3 b))
(init (cell 3 1 b))
(init (cell 3 2 b))
(init (cell 3 3 b))
(init (control player1))
(init (piecount 0))

(init (usingMarker player1 x))
(init (usingMarker player2 o))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Dynamic Components
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; Cell

(<= (next (cell ?x ?y ?m))
    (does ?r (mark ?x ?y))
    (true (usingMarker ?r ?m)))

(<= (next (cell ?x ?y ?m))
    (true (cell ?x ?y ?m))
    (distinct ?m b))

(<= (next (cell ?x ?y b))
    (does ?r (mark ?j ?k))
    (true (cell ?x ?y b))
    (or (distinct ?x ?j) (distinct ?y ?k)))

(<= (next (cell ?x ?y b))
    (true (cell ?x ?y b))
    (does ?r swap)
    (role ?r))

(<= (next (control player1))
    (true (control player2)))

(<= (next (control player2))
    (true (control player1)))

(<= (next (usingMarker ?r ?m))
    (true (usingMarker ?r ?m))
    (does ?s (mark ?j ?k))
    (role ?s)
    (index ?j)
    (index ?k))

(<= (next (usingMarker player1 ?m))
    (true (usingMarker player2 ?m))
    (or (does player1 swap) (does player2 swap)))

(<= (next (usingMarker player2 ?m))
    (true (usingMarker player1 ?m))
    (or (does player1 swap) (does player2 swap)))

(<= (next (piecount ?np1))
    (true (piecount ?n))
    (succ ?n ?np1)
    (does ?r swap)
    (role ?r))

(<= (next (piecount ?n))
    (true (piecount ?n))
    (does ?r (mark ?j ?k))
    (role ?r)
    (index ?j)
    (index ?k))

(<= (next debuglinex)
    (line x))

(<= (next debuglineo)
    (line o))

(<= (row ?m ?x)
(true (cell ?m 1 ?x))
(true (cell ?m 2 ?x))
(true (cell ?m 3 ?x)))

(<= (column ?n ?x)
(true (cell 1 ?n ?x))
(true (cell 2 ?n ?x))
(true (cell 3 ?n ?x)))

(<= (diagonal ?x)
(true (cell 1 1 ?x))
(true (cell 2 2 ?x))
(true (cell 3 3 ?x)))

(<= (diagonal ?x)
(true (cell 1 3 ?x))
(true (cell 2 2 ?x))
(true (cell 3 1 ?x)))

(<= (line ?x) (row ?m ?x))
(<= (line ?x) (column ?m ?x))
(<= (line ?x) (diagonal ?x))

(<= open
(true (cell ?m ?n b)))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(<= (legal ?w (mark ?x ?y))
    (true (cell ?x ?y b))
    (true (control ?w))
    (not (line x))
    (not (line o)))

(<= (legal ?w swap)
    (true (control ?w))
    (not (true (piecount 10))))

(<= (legal player2 noop)
    (true (control player1)))

(<= (legal player1 noop)
    (true (control player2)))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;(<= (goal ?r 100)
;    (line ?m)
;    (true (usingMarker ?r ?m)))

;(<= (goal ?r 0)
;    (line ?m)
 ;   (true (usingMarker ?r ?n))
 ;   (distinct ?m ?n)
  ;  (distinct ?m b))

(<= (goal player1 100)
    (line x)
    (true (piecount 10))
    (true (usingMarker player1 x)))
(<= (goal player1 100)
    (line o)
    (true (piecount 10))
    (true (usingMarker player1 o)))
(<= (goal player2 100)
    (line x)
    (true (piecount 10))
    (true (usingMarker player2 x)))
(<= (goal player2 100)
    (line o)
    (true (piecount 10))    
    (true (usingMarker player2 o)))

(<= (goal player1 0)
    (line o)
    (true (piecount 10))    
    (true (usingMarker player1 x)))
(<= (goal player1 0)
    (line x)
    (true (piecount 10))    
    (true (usingMarker player1 o)))
(<= (goal player2 0)
    (line o)
    (true (piecount 10))    
    (true (usingMarker player2 x)))
(<= (goal player2 0)
    (line x)
    (true (piecount 10))    
    (true (usingMarker player2 o)))

(<= (goal player1 50)
    (not (line x))
    (not (line o))
    (true (piecount 10))
    (not open))

(<= (goal player2 50)
    (not (line x))
    (not (line o))
    (true (piecount 10))    
    (not open))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(<= terminal
(line x)
(true (piecount 10)))

(<= terminal
(line o)
(true (piecount 10)))

(<= terminal
(not (line x))
(not (line o))
(not open)
(true (piecount 10)))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(succ 0 1)
(succ 1 2)
(succ 2 3)
(succ 3 4)
(succ 4 5)
(succ 5 6)
(succ 6 7)
(succ 7 8)
(succ 8 9)
(succ 9 10)
(succ 10 11)
(succ 11 12)
(succ 12 13)
(succ 13 14)
(succ 14 15)
(succ 15 16)
(succ 16 17)
(succ 17 18)
(succ 18 19)
(succ 19 20)
(succ 20 21)
(succ 21 22)
(succ 22 23)
(succ 23 24)
(succ 24 25)
(succ 25 26)
(succ 26 27)
(succ 27 28)
(succ 28 29)
(succ 29 30)
(succ 30 31)
(succ 31 32)
(succ 32 33)
(succ 33 34)
(succ 34 35)
(succ 35 36)
(succ 36 37)
(succ 37 38)
(succ 38 39)
(succ 39 40)
(succ 40 41)
(succ 41 42)
(succ 42 43)
(succ 43 44)
(succ 44 45)
(succ 45 46)
(succ 46 47)
(succ 47 48)
(succ 48 49)
(succ 49 50)
(succ 50 51)
(succ 51 52)
(succ 52 53)
(succ 53 54)
(succ 54 55)
(succ 55 56)
(succ 56 57)
(succ 57 58)
(succ 58 59)
(succ 59 60)
(succ 60 61)
(succ 61 62)
(succ 62 63)
(succ 63 64)
SteadyEddie123 commented 8 years ago

Issue is optimizeInputSets which considers inputs with arity 0 as noops, but swap has arity 0.