algorithm name (search) and root negamax

Discussion of chess software programming and technical issues.

Moderator: Ras

tcusr
Posts: 325
Joined: Tue Aug 31, 2021 10:32 pm
Full name: tcusr

algorithm name (search) and root negamax

Post by tcusr »

how is it called when you use the scores of previous searches inside ID to reorder root moves?

i use a root negamax as a naive way to keep track of the best move but it is just duplicate code and another source of bugs, therefore i decided to remove it and use a simple ID loop with a single negamax for all nodes (except leaf nodes of course) and get the best move from the PV.
the thing is i still want to use that algorithm but how am i supposed to do it if in the PV i only have one best move?
yeni_sekme
Posts: 40
Joined: Mon Mar 01, 2021 7:51 pm
Location: İstanbul, Turkey
Full name: Ömer Faruk Tutkun

Re: algorithm name (search) and root negamax

Post by yeni_sekme »

You cannot order moves by their search scores.

Let say alpha is 50cp h2h4 move returns 50cp. That does just mean the move fails low, the actual score of h2h4 may be -200cp.
tcusr
Posts: 325
Joined: Tue Aug 31, 2021 10:32 pm
Full name: tcusr

Re: algorithm name (search) and root negamax

Post by tcusr »

yeni_sekme wrote: Tue Mar 08, 2022 5:51 am You cannot order moves by their search scores.

Let say alpha is 50cp h2h4 move returns 50cp. That does just mean the move fails low, the actual score of h2h4 may be -200cp.
moves are ordered normally, what i mean is that if the first capture at depth 1 turns out to be bad i use the search score to adjust the move score and sort the movelist again so that instead of being played first this move is put a bit down the list.
ideally this should be done for all depths inside ID.
tcusr
Posts: 325
Joined: Tue Aug 31, 2021 10:32 pm
Full name: tcusr

Re: algorithm name (search) and root negamax

Post by tcusr »

this is what i mean
the idea is at 43.20 (go back to 42.38 for the question)
Mergi
Posts: 127
Joined: Sat Aug 21, 2021 9:55 pm
Full name: Jen

Re: algorithm name (search) and root negamax

Post by Mergi »

For move ordering deeper down in the tree, that's what tranposition table is for (and/or some other tables that you fill during the search). As for the root node, one of the most effective and easist to imlement techniques is to keep track of how many nodes you explored for each move. The more nodes you explore, the harder the move was to refute, meaning it's more likely a good move. Also it can be a good idea to keep moves you previously considered as the best somewhere close to the top of the list regardless of their node count.
tcusr
Posts: 325
Joined: Tue Aug 31, 2021 10:32 pm
Full name: tcusr

Re: algorithm name (search) and root negamax

Post by tcusr »

Mergi wrote: Mon Mar 14, 2022 1:48 am For move ordering deeper down in the tree, that's what tranposition table is for (and/or some other tables that you fill during the search). As for the root node, one of the most effective and easist to imlement techniques is to keep track of how many nodes you explored for each move. The more nodes you explore, the harder the move was to refute, meaning it's more likely a good move. Also it can be a good idea to keep moves you previously considered as the best somewhere close to the top of the list regardless of their node count.
ok so that was a complete misunderstanding by me then, thanks