Hello,
I currently have History and (2) Killer moves implemented in my engine, but I stumbled upon Countermoves on the Wiki.
They all get updated on a beta-cutoff, so seems like the same thing? Is it supposed to be used together with the others, or is it an alternative?
I'm currently setting up tests to see how it works together with my engine, but I wanted to post here to see if anybody else has some insight
Thanks in advance!
Question about Countermoves
Moderator: Ras
-
- Posts: 41
- Joined: Tue Jan 09, 2024 8:38 pm
- Full name: E Boatwright
Question about Countermoves
Creator of Maxwell
-
- Posts: 462
- Joined: Mon Jun 07, 2010 3:13 am
- Location: Holland, MI
- Full name: Martin W
Re: Question about Countermoves
History generally tracks only to-from for stm, while counters use previous move piece-to, so you're getting a little more information with the cutoff. Some engines use piece-to as history but even then counters should still add useful information... since neither history or killers use the previous move it is beneficial with or without them. After running a super fast match with and without counter moves (and both with history and killers), counter moves easily yields 10+ Elo in my engine. For 10ish lines of code, it's a must-have.eboatwright wrote: ↑Sat Jan 27, 2024 7:14 pm Hello,
I currently have History and (2) Killer moves implemented in my engine, but I stumbled upon Countermoves on the Wiki.
They all get updated on a beta-cutoff, so seems like the same thing? Is it supposed to be used together with the others, or is it an alternative?
I'm currently setting up tests to see how it works together with my engine, but I wanted to post here to see if anybody else has some insight
Thanks in advance!
-
- Posts: 41
- Joined: Tue Jan 09, 2024 8:38 pm
- Full name: E Boatwright
Re: Question about Countermoves
Thank you so much!gaard wrote: ↑Sat Jan 27, 2024 8:50 pmHistory generally tracks only to-from for stm, while counters use previous move piece-to, so you're getting a little more information with the cutoff. Some engines use piece-to as history but even then counters should still add useful information... since neither history or killers use the previous move it is beneficial with or without them. After running a super fast match with and without counter moves (and both with history and killers), counter moves easily yields 10+ Elo in my engine. For 10ish lines of code, it's a must-have.eboatwright wrote: ↑Sat Jan 27, 2024 7:14 pm Hello,
I currently have History and (2) Killer moves implemented in my engine, but I stumbled upon Countermoves on the Wiki.
They all get updated on a beta-cutoff, so seems like the same thing? Is it supposed to be used together with the others, or is it an alternative?
I'm currently setting up tests to see how it works together with my engine, but I wanted to post here to see if anybody else has some insight
Thanks in advance!
I'll try that with my engine, although my engine's history indexes by [piece moved][to], so I'll try switching that around
Creator of Maxwell
-
- Posts: 41
- Joined: Tue Jan 09, 2024 8:38 pm
- Full name: E Boatwright
Re: Question about Countermoves
Update: I changed my History heuristic to index by [side to move][piece moved from][piece moved to] and that was a decent improvement!
I'm currently running some tests on countermoves (indexed by [piece moved][piece moved to]) but it's not looking good so far
I'm currently running some tests on countermoves (indexed by [piece moved][piece moved to]) but it's not looking good so far
Creator of Maxwell
-
- Posts: 118
- Joined: Sat Jul 30, 2022 12:12 pm
- Full name: Jamie Whiting
Re: Question about Countermoves
I simplified Counter Moves out a while ago: https://chess.swehosting.se/test/4437/, its probably the case that once you add all the quiet history improvements countermoves are kinda superfluous (after 1-ply conthist in particular).
Also I noticed you use a HashMap for your transposition table: https://github.com/eboatwright/Maxwell/ ... ble.rs#L24
I'd recommend switching to just an array of entries.
Obligatory discord server links (you'll get much faster + better help there):
Engine Programming - https://discord.gg/YctB2p4
Stockfish - https://discord.gg/GWDRS3kU6R
Also I noticed you use a HashMap for your transposition table: https://github.com/eboatwright/Maxwell/ ... ble.rs#L24
I'd recommend switching to just an array of entries.
Obligatory discord server links (you'll get much faster + better help there):
Engine Programming - https://discord.gg/YctB2p4
Stockfish - https://discord.gg/GWDRS3kU6R
-
- Posts: 41
- Joined: Tue Jan 09, 2024 8:38 pm
- Full name: E Boatwright
Re: Question about Countermoves
Yeah the test I ran actually showed a decrease in strength, so I think I'll leave it out since I already have Killer moves and HistoryJacquesRW wrote: ↑Fri Feb 02, 2024 8:44 pm I simplified Counter Moves out a while ago: https://chess.swehosting.se/test/4437/, its probably the case that once you add all the quiet history improvements countermoves are kinda superfluous (after 1-ply conthist in particular).
At one point I was using a Vec for the transposition table, but I switched back to a HashMap because it's easier hahaAlso I noticed you use a HashMap for your transposition table: https://github.com/eboatwright/Maxwell/ ... ble.rs#L24
I'd recommend switching to just an array of entries.
I'll try moving it back
Thanks!
Creator of Maxwell