Answers.Body: <p>You use neither.</p>
  
  <p>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.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-02-13T14:31:21.460Z
Answers.Text: 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.
Answers.UserDisplayName: nak3c
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-02-12T12:01:08.457Z
Answers.LastActivityDate: 2017-02-12T12:01:08.457Z
Answers.UserDisplayName: ZirconiumX
Body: <p>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?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-02-12T04:38:38.110Z
Comments.Text: Why a triangular array?
Comments.UserDisplayName: wogsland
Tags: <engines><transpositions>
Title: multi PVs using triangular array
ThreadText: # multi PVs using triangular array
  
  (Asked by: username_0 on 2017-02-12)
  
  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?
  
  **Tags:** engines, transpositions
  
  > **Comments:**
  > **username_1**: Why a triangular array?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2017-02-12. Score: 0 | Accepted answer
  
  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.
  
  > **Comments:**
  > **username_0**: 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.  
  
  ---
  
  