If we have 64 threads can we modify search?
Moderator: Ras
-
- Posts: 3621
- Joined: Wed Mar 08, 2006 8:15 pm
- Full name: Jouni Uski
If we have 64 threads can we modify search?
One idea: every thread search one possible move only and then best is selected. Will this made SMP search weaker than normal search?
Jouni
-
- Posts: 1062
- Joined: Tue Apr 28, 2020 10:03 pm
- Full name: Daniel Infuehr
Re: If we have 64 threads can we modify search?
Suppose you had 4 legal moves. Would you run the CPU on 6% of its potential just because that seemed easier?
Worlds-fastest-Bitboard-Chess-Movegenerator
Daniel Inführ - Software Developer
Daniel Inführ - Software Developer
-
- Posts: 263
- Joined: Wed Jun 16, 2021 2:08 am
- Location: Berlin
- Full name: Jost Triller
Re: If we have 64 threads can we modify search?
If you're not in multi pv mode, this will likely make the engine weaker, as many of the less good moves could be searched with a much higher alpha value if you'd wait for the first (or even second, third, ...) move to raise alpha.
-
- Posts: 1957
- Joined: Tue Apr 19, 2016 6:08 am
- Location: U.S.A
- Full name: Andrew Grant
Re: If we have 64 threads can we modify search?
Massively, would be the guess. In Alphabeta, you spend almost all the time on the played move, 10% on the next best, and maybe a few% of the time on all remaining moves. Most moves are just bad. Now if you could, somehow brilliantly limit your search down to just a couple candidate moves instantly, then maybe splitting threads up to do proper searches would work. But I'm not entirely convinced of that even.
You could test this, in a scuffed way. Play games with 4 threads. At at search, move of your turn, do a multipv depth=15 search. Get those 4 moves. Now assign one thread to each for YOUR version of SMP. For the baseline, issue another search but limit it via searchmoves move1 move2 move3 move4.
-
- Posts: 466
- Joined: Fri Dec 16, 2016 11:04 am
- Location: France
- Full name: Richard Delorme
Re: If we have 64 threads can we modify search?
In his thesis (from 1995) Jean Christophe Weill called it the naive approach for parallelism. For a branching factor of 40, at best an asymptotic acceleration of 14.2 can be expected. In practice, measurements gave an acceleration of 6 only. On modern engine, it would probably be even worst.
Richard Delorme
-
- Posts: 1062
- Joined: Tue Apr 28, 2020 10:03 pm
- Full name: Daniel Infuehr
Re: If we have 64 threads can we modify search?
Yesyes - then you start to take the first N moves no matter at which depth they occur.
Then you stop search on unpromising moves.
Then you keep upper and lower bounds shared between threats.
Then you would like these bounds to be known at high confidence before splitting the workload.
The path from naive to optimized inevidabely ends up at YBWC, which is also not very scalable.
You heard it here first. MCTS is the future, its already almost competitive, with a slope for the rate of improvement higher than that for alphabeta.
Then you stop search on unpromising moves.
Then you keep upper and lower bounds shared between threats.
Then you would like these bounds to be known at high confidence before splitting the workload.
The path from naive to optimized inevidabely ends up at YBWC, which is also not very scalable.
You heard it here first. MCTS is the future, its already almost competitive, with a slope for the rate of improvement higher than that for alphabeta.
Worlds-fastest-Bitboard-Chess-Movegenerator
Daniel Inführ - Software Developer
Daniel Inführ - Software Developer
-
- Posts: 3230
- Joined: Wed Mar 10, 2010 10:18 pm
- Location: Hamburg, Germany
- Full name: Srdja Matovic
Re: If we have 64 threads can we modify search?
I suggested RMO - Randomized Move Order - for >=256 cores, maybe somebody will give it some day a try on CPU:
https://talkchess.com/forum3/viewtopic.php?f=7&t=72684
--
Srdja
-
- Posts: 1992
- Joined: Thu Sep 18, 2008 10:24 pm
Re: If we have 64 threads can we modify search?
I might have asked this question 5 years ago but in a different way:
Imagine a very rich man - Mr Filthy Rich - who wants to be the best at correspondence chess, where each opponent has 24 hours to move. To achieve this goal he wants the fastest computer on Earth. But he's no programmer and can't build himself a cluster or supercomputer.
So he comes up with a plan: he'll buy 100 of the fastest workstations available, say $20,000 each, so $2 Million in total. Each machine runs latest Stockfish. When his opponent makes a move he gets each machine to analyze a different legal possible reply move until every legal move is accounted for. Since most chess positions only have 30-50 legal moves, most of his machines don't do anything most of the time, but he has them just in case there's a position with a high number of legal moves.
His point is this: even the weird moves get serious attention: a full 24 hours of search. At the end of each 24 hours, he walks around his machines and picks the chess move with the highest score.
His opponent - Mr Fairly Rich - has ONE top-end workstation, like the ones Mr. Filthy Rich has, but only one of them. He also runs latest Stockfish for 24 hours, but it searches normally considering all legal moves.
Question: How much stronger is Mr Filthy Rich's setup than Mr Fairly Rich's?
Most people estimated less than 50 elo and that was 5 years ago.
Imagine a very rich man - Mr Filthy Rich - who wants to be the best at correspondence chess, where each opponent has 24 hours to move. To achieve this goal he wants the fastest computer on Earth. But he's no programmer and can't build himself a cluster or supercomputer.
So he comes up with a plan: he'll buy 100 of the fastest workstations available, say $20,000 each, so $2 Million in total. Each machine runs latest Stockfish. When his opponent makes a move he gets each machine to analyze a different legal possible reply move until every legal move is accounted for. Since most chess positions only have 30-50 legal moves, most of his machines don't do anything most of the time, but he has them just in case there's a position with a high number of legal moves.
His point is this: even the weird moves get serious attention: a full 24 hours of search. At the end of each 24 hours, he walks around his machines and picks the chess move with the highest score.
His opponent - Mr Fairly Rich - has ONE top-end workstation, like the ones Mr. Filthy Rich has, but only one of them. He also runs latest Stockfish for 24 hours, but it searches normally considering all legal moves.
Question: How much stronger is Mr Filthy Rich's setup than Mr Fairly Rich's?
Most people estimated less than 50 elo and that was 5 years ago.
-
- Posts: 313
- Joined: Tue Aug 03, 2021 2:41 pm
- Full name: Bill Beame
Re: If we have 64 threads can we modify search?
"...Question: How much stronger is Mr Filthy Rich's setup than Mr Fairly Rich's?Werewolf wrote: ↑Sun Oct 09, 2022 11:35 am I might have asked this question 5 years ago but in a different way:
Imagine a very rich man - Mr Filthy Rich - who wants to be the best at correspondence chess, where each opponent has 24 hours to move. To achieve this goal he wants the fastest computer on Earth. But he's no programmer and can't build himself a cluster or supercomputer.
So he comes up with a plan: he'll buy 100 of the fastest workstations available, say $20,000 each, so $2 Million in total. Each machine runs latest Stockfish. When his opponent makes a move he gets each machine to analyze a different legal possible reply move until every legal move is accounted for. Since most chess positions only have 30-50 legal moves, most of his machines don't do anything most of the time, but he has them just in case there's a position with a high number of legal moves.
His point is this: even the weird moves get serious attention: a full 24 hours of search. At the end of each 24 hours, he walks around his machines and picks the chess move with the highest score.
His opponent - Mr Fairly Rich - has ONE top-end workstation, like the ones Mr. Filthy Rich has, but only one of them. He also runs latest Stockfish for 24 hours, but it searches normally considering all legal moves.
Question: How much stronger is Mr Filthy Rich's setup than Mr Fairly Rich's?
Most people estimated less than 50 elo and that was 5 years ago.
Most people estimated less than 50 elo and that was 5 years ago."
Other objective: Fastest Checkmate
Case 1: Most classical mate puzzles:
Now Mr. Filthy Rich is at least 3x as fast. Most good evaluation functions can find the checkmate in the first 3-5 moves.
Case 2: Specially designed mates to befuddle a computer
Now Mr. Filthy Rich has HUGE advantage, about 20x on average, and more likely 30x or higher, since the solution will be a very unlikely move like a Queen sacrifice.
My guess if at least 150 ELO, especially if those workstations have multiple cores.
It pays to be rich these days.
-
- Posts: 1992
- Joined: Thu Sep 18, 2008 10:24 pm
Re: If we have 64 threads can we modify search?
Yes agreed, with those aims the rewards are much higher.Chessnut1071 wrote: ↑Sun Oct 09, 2022 6:34 pm"...Question: How much stronger is Mr Filthy Rich's setup than Mr Fairly Rich's?Werewolf wrote: ↑Sun Oct 09, 2022 11:35 am I might have asked this question 5 years ago but in a different way:
Imagine a very rich man - Mr Filthy Rich - who wants to be the best at correspondence chess, where each opponent has 24 hours to move. To achieve this goal he wants the fastest computer on Earth. But he's no programmer and can't build himself a cluster or supercomputer.
So he comes up with a plan: he'll buy 100 of the fastest workstations available, say $20,000 each, so $2 Million in total. Each machine runs latest Stockfish. When his opponent makes a move he gets each machine to analyze a different legal possible reply move until every legal move is accounted for. Since most chess positions only have 30-50 legal moves, most of his machines don't do anything most of the time, but he has them just in case there's a position with a high number of legal moves.
His point is this: even the weird moves get serious attention: a full 24 hours of search. At the end of each 24 hours, he walks around his machines and picks the chess move with the highest score.
His opponent - Mr Fairly Rich - has ONE top-end workstation, like the ones Mr. Filthy Rich has, but only one of them. He also runs latest Stockfish for 24 hours, but it searches normally considering all legal moves.
Question: How much stronger is Mr Filthy Rich's setup than Mr Fairly Rich's?
Most people estimated less than 50 elo and that was 5 years ago.
Most people estimated less than 50 elo and that was 5 years ago."
Other objective: Fastest Checkmate
Case 1: Most classical mate puzzles:
Now Mr. Filthy Rich is at least 3x as fast. Most good evaluation functions can find the checkmate in the first 3-5 moves.
Case 2: Specially designed mates to befuddle a computer
Now Mr. Filthy Rich has HUGE advantage, about 20x on average, and more likely 30x or higher, since the solution will be a very unlikely move like a Queen sacrifice.
My guess if at least 150 ELO, especially if those workstations have multiple cores.
It pays to be rich these days.