2

I am currently using a triangular array to collect the PV in my chess engine (written in C). However, I would like to return several variations such as the second best, third best, and so fourth. Is is possible to do with a triangular array scheme or do I need to use a transposition table. In either case is there a simple example of an engine that uses; one preferably in C?

1
  • Why a triangular array?
    – wogsland
    Commented Feb 12, 2017 at 4:38

1 Answer 1

0

You use neither.

You run your search to collect the best PV from your triangular table. This gives you your best variation. Then you exclude this best move and run another search to get the best PV from your triangular table. This gives you your second best variation. And so on.

1
  • This is a nice idea. I could also add a line to the evaluation function that punishes the last variation returned. I havn't implemented yet but this answer should work until I feel like implementing a TT.
    – nak3c
    Commented Feb 13, 2017 at 14:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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