I am working on my chess engine [1]. My issue is that if I run the AI bots in [2] with the depth of 4 for both the bots, already after the 13th ply the game breaks the three-fold repetion rule. I have absolutely no idea how to program my engine to avoid going to the breakage of the rule in question.
Any advice?
References
[1] Chess.java
[2] The demo AI vs AI match runner here: ChessDuel.java
.