dantb / chess-with-tdd

A chess game and engine built using test-driven development
1 stars 0 forks source link

Cloning failing reference equality between Board and BoardCache #4

Open dantb opened 7 years ago

dantb commented 7 years ago

Noticed this when changing the engine to use the cloning. It appears the board cache pieces are not the same pieces as those on the board - I find it odd at this hasn't manifested itself in a different way.

Try to drill down the specific scenario and raise to the creator of the deep copying at: https://www.codeproject.com/Articles/1111658/Fast-Deep-Copy-by-Expression-Trees-C-Sharp

dantb commented 7 years ago

Issue affects minimax algorithm now as well - load up position file MinmaxAlgorithmFailsToCheckmateDueToBugInCloning.txt to see engine fail to checkmate. Part of the same issue. Also cloning problem would enable me to use that for the engine so I can go deeper in the minimax search.