0

I am curious of the games that would arise if I changed the initial value of a knight to -1 or make standing on e5 worth -10 points.

How would I go about to create such an engine? Is it possible to alter an existing engine in such a way and let it play against itself?

  • Depends on the engine. Did you have one in mind? – D M May 12 '19 at 17:27
  • No, and I have no (concrete) idea about the internal workings of engines. I only know some programming (Python, C++). Would you have any suggestions? – idle mathematician May 12 '19 at 17:29
  • 1
    Knowing that you know some programming is helpful, since it means you could modify those values in any open-source engine. – D M May 12 '19 at 17:43
  • Some engines might allow you to do that via the UCI configuration. Check with your favorite engines. – Qudit May 12 '19 at 19:08
  • I have managed to do it, when setting the knight value to the same, but negative, they surprisingly become the strongest pieces on the board and wreak havoc while the opponent refuses to capture them. – idle mathematician May 13 '19 at 15:25
3

Yes. You can download the source code for Stockfish here. Once you have done that you need to work out where the evaluation functions are and change them according to your requirements. Then recompile and run.

  • For example, types.h contains the generic values of the pieces, which are easily adjusted. psqt.cpp is where you can edit how much standing on e5 or d5 is worth. It assumes symmetry, though, so d5 and e5 will be the same (and those values would apply to d4 and e4 for the other color) unless you make more substantial changes. When two values are listed for something, often one is for the middlegame and one is for the endgame. – D M May 12 '19 at 18:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.