02-20-2021, 09:06 AM
OK, rather than try to solve this directly, I went back and was able to get a simple Select move to function properly for the "MoveFriendly" case. eliminating the complications. I also took the opportunity to clean up the code and add in state-based piece styling to show selection of the moving piece, so it is now working quite reasonably. It would be nice if the Selects could be characterized as "from" for the MoveFriendly select, and "to" for the continuation Select. but it is not important and not going to happen...
So that all fine except the AI is consistantly hanging now:
I am attaching the new script, and a sample of a trial that hung.
Here is the terminal output, and I am attaching the trial using A/B vs A/B at one second.
Compiled Throngs successfully.
Exception in thread "Thread-61" java.lang.ArrayIndexOutOfBoundsException: Index 6 out of bounds for length 6
at util.zhash.HashedChunkSet.setChunk(HashedChunkSet.java:168)
at util.state.containerState.ContainerGraphState.setSite(ContainerGraphState.java:1268)
at util.action.state.ActionSetState.apply(ActionSetState.java:78)
at util.Move.apply(Move.java:469)
at util.Move.apply(Move.java:489)
at game.Game.applyInternal(Game.java:2707)
at game.Game.apply(Game.java:2661)
at search.minimax.AlphaBetaSearch.alphaBeta(AlphaBetaSearch.java:541)
at search.minimax.AlphaBetaSearch.alphaBeta(AlphaBetaSearch.java:584)
at search.minimax.AlphaBetaSearch.alphaBeta(AlphaBetaSearch.java:584)
at search.minimax.AlphaBetaSearch.alphaBeta(AlphaBetaSearch.java:542)
at search.minimax.AlphaBetaSearch.iterativeDeepening(AlphaBetaSearch.java:306)
at search.minimax.AlphaBetaSearch.selectAction(AlphaBetaSearch.java:182)
at util.ThinkingThread$ThinkingThreadRunnable.run(ThinkingThread.java:186)
at java.base/java.lang.Thread.run(Thread.java:834)
File encoding: UTF-8
So that all fine except the AI is consistantly hanging now:
I am attaching the new script, and a sample of a trial that hung.
Here is the terminal output, and I am attaching the trial using A/B vs A/B at one second.
Compiled Throngs successfully.
Exception in thread "Thread-61" java.lang.ArrayIndexOutOfBoundsException: Index 6 out of bounds for length 6
at util.zhash.HashedChunkSet.setChunk(HashedChunkSet.java:168)
at util.state.containerState.ContainerGraphState.setSite(ContainerGraphState.java:1268)
at util.action.state.ActionSetState.apply(ActionSetState.java:78)
at util.Move.apply(Move.java:469)
at util.Move.apply(Move.java:489)
at game.Game.applyInternal(Game.java:2707)
at game.Game.apply(Game.java:2661)
at search.minimax.AlphaBetaSearch.alphaBeta(AlphaBetaSearch.java:541)
at search.minimax.AlphaBetaSearch.alphaBeta(AlphaBetaSearch.java:584)
at search.minimax.AlphaBetaSearch.alphaBeta(AlphaBetaSearch.java:584)
at search.minimax.AlphaBetaSearch.alphaBeta(AlphaBetaSearch.java:542)
at search.minimax.AlphaBetaSearch.iterativeDeepening(AlphaBetaSearch.java:306)
at search.minimax.AlphaBetaSearch.selectAction(AlphaBetaSearch.java:182)
at util.ThinkingThread$ThinkingThreadRunnable.run(ThinkingThread.java:186)
at java.base/java.lang.Thread.run(Thread.java:834)
File encoding: UTF-8