Awesome accomplishment! 1800 elo is pretty darn strong.
I played a game and promptly went down two pawns (at my peak I was 1804 UCSF rating), but managed an opposite bishops ending. This gave me an opportunity to test out your end game play and "drawn game" provisions. I pretty much sat my King in the center and moved my Bishop back and forth between two squares for about a hundred moves.
I *think* you algorithm avoided repeating a position 3 times, but am not certain, and that it also avoided the rule where there has to be a pawn advance in fifty moves, but it sure seemed to lose its sense of direction once I staked out a passive, defensive position. I think it had a won game, though there are a few challenges to opposite Bishops.
Then, it froze on move 145.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| Exception in thread "Thread-12" java.lang.ArrayIndexOutOfBoundsException: 300 at chess.findNextMove(chess.java:5248) at chess.findNextMove(chess.java:5365) at chess.findNextMove(chess.java:5365) at chess.findNextMove(chess.java:5365) at chess.findNextMove(chess.java:5365) at chess.findNextMove(chess.java:5365) at chess.findNextMove(chess.java:5365) at chess.findNextMove(chess.java:5365) at chess.findNextMove(chess.java:5365) at chess.findNextMove(chess.java:5365) at chess.findNextMove(chess.java:5365) at chess.findNextMove(chess.java:5076) at chess.playCompMove(chess.java:5708) at chess.run(chess.java:7073) at java.lang.Thread.run(Unknown Source) |
Maybe you need to provide for more moves?
I was able to copy the move history, if that is of any help.
1. e4 d5 2. exd5 Qxd5 3. Nf3 Bg4 4. Be2 Bxf3 5. Bxf3 Qe6+ 6. Qe2 Qxe2+ 7. Bxe2 Nd7 8. d4 e5 9. dxe5 Nxe5 10. Bf4 Bd6 11. Nc3 Nf6 12. O-O-O O-O 13. Nb5 Nd3+ 14. Rxd3 Bxf4+ 15. Kb1 Ne4 16. Rd4 Nxf2 17. Rf1 Bxh2 18. Rd7 Ne4 19. Bc4 Nf6 20. Re7 c6 21. Nc3 b5 22. Bd3 Bd6 23. Re2 Rf8d8 24. Ne4 Nxe4 25. Bxe4 Ra8c8 26. Re2f2 Re8 27. Bd3 Re7 28. Re2 Rc8e8 29. Rxe7 Rxe7 30. c3 h6 31. Kc2 Re8 32. a4 a6 33. Rd1 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bd5 Bc7 121. Bc4 Bg3 122. Bd5 Bh2 123. Bc4 Bg1 124. Bd5 Bf2 125. Bc4 Bd4 126. Bd5 Ba7 127. Bc4 Bf2 128. Bd5 Bd4 129. Bc4 Ba7 130. Bd5 Bc5 131. Bc4 Bb6 132. Bd5 Bg1 133. Bc4 Bh2 134. Bd5 Bg3 135. Bc4 Be1 136. Bd5 Bc3 137. Bc4 Bb2 138. Bd5 Ba1 139. Bc4 Bc3 140. Bd5 Be1 141. Bc4 Bd2 142. Bd5 Bb4 143. Bc4 Bc5 144. Bd5 Bb6 145. Bc4
Can the move history be set so that the most recent moves are always on display?
One other very modest tip: when you first init the game, go ahead and play a "silent" version of your sound effect. Then, when the first move occurs, the first sound won't lag so much.
Very impressive!!
And welcome to JGO! I remember meeting you at JavaRanch.