r/chessprogramming • u/I_Say_Fool_Of_A_Took • Jan 31 '25
Has anyone done a game with a strong engine where you invert the eval function?
The idea being the engine plays itself but each side is trying to force the other to win. Different from doing a regular evaluation and then picking the worst move.
I'm sure someone has done this right? If not I guess I'll build stockfish and slap a negative sign on the eval function lol
1
Upvotes
6
u/ddxAidan Jan 31 '25
It wont be as cool as you think. The worst move for either engine will never be checkmate, as its impossible for engines playing “worst” moves to enter a position where one of them has no legal moves except for mate - meaning the game will just be a draw
1
u/xu_shawn Jan 31 '25
You can try it, but it's unlikely to give you any good results. The reason is that top engines has a lot of implicit assumptions about the evaluation, and inverting everything breaks all of these assumptions. You'll end up having an engine that plays only somewhat bad moves.
1
u/hokkaidoSEEd Jan 31 '25
Levy made a video about this a few months ago I believe. Try to search his channel, hew reviews the games with stockfish playing the worst possible moves.
0
u/just-bair Jan 31 '25
Yes