Just saw this and wanted to share it, nice bit of history and trick in getting the inverse aquareroot
code
http://www.codemaestro.com/reviews/9
history
http://www.beyond3d.com/content/articles/8/
For the bit tweakers
Moderators: hgm, Rebel, chrisw
-
- Posts: 12542
- Joined: Wed Mar 08, 2006 8:57 pm
- Location: Redmond, WA USA
Re: For the bit tweakers
http://www.jjj.de/fxt/fxtpage.html#fxtbook
Look at "Algorithms for Programmers"
Look at "Algorithms for Programmers"
Re: For the bit tweakers
No application for chess engines?Dann Corbit wrote:http://www.jjj.de/fxt/fxtpage.html#fxtbook
Look at "Algorithms for Programmers"
-
- Posts: 12542
- Joined: Wed Mar 08, 2006 8:57 pm
- Location: Redmond, WA USA
Re: For the bit tweakers
Are you kidding? It's crammed with stuff that will be useful for chess programs.Steelman wrote:No application for chess engines?Dann Corbit wrote:http://www.jjj.de/fxt/fxtpage.html#fxtbook
Look at "Algorithms for Programmers"
There are loads of bit twiddling algorithms, there are debruijn algorithm explanations and demonstrations.
Much of it is aimed at extended precision calculations, but there is plenty of other interesting stuff in there.
-
- Posts: 316
- Joined: Wed Apr 12, 2006 10:47 pm
Re: For the bit tweakers
Interesting, but when would you use an inverse square root in a chess engine, I don't think I use them in mine.
Colin
-
- Posts: 267
- Joined: Fri Mar 17, 2006 8:01 am
- Location: Russia
- Full name: Vladimir Medvedev
Re: For the bit tweakers
But maybe proper use of an inverse square root is the main secret of Rybka's strength?cms271828 wrote:Interesting, but when would you use an inverse square root in a chess engine, I don't think I use them in mine.
-
- Posts: 2250
- Joined: Wed Mar 08, 2006 8:47 pm
- Location: Hattingen, Germany
Re: For the bit tweakers
You mean the fast sigmoid bending of eval terms on the game phase via RSQRTPS?WinPooh wrote:But maybe proper use of an inverse square root is the main secret of Rybka's strength?cms271828 wrote:Interesting, but when would you use an inverse square root in a chess engine, I don't think I use them in mine.
-
- Posts: 2684
- Joined: Sat Jun 14, 2008 9:17 pm
Re: For the bit tweakers
.Gerd Isenberg wrote:You mean the fast sigmoid bending of eval terms on the game phase via RSQRTPS?WinPooh wrote:But maybe proper use of an inverse square root is the main secret of Rybka's strength?cms271828 wrote:Interesting, but when would you use an inverse square root in a chess engine, I don't think I use them in mine.
Nice to know this sigmoid implementation. I come up with a linearized one few weeks ago
http://64.68.157.89/forum/viewtopic.php?t=23860
But I didn't know this argument has been already investigated before.
-
- Posts: 2851
- Joined: Wed Mar 08, 2006 10:01 pm
- Location: Irvine, CA, USA
Re: For the bit tweakers
Inverse square root is easy and usually just takes one or two instructions. Just multiply the number by itself.kiroje wrote:...inverse aquareroot..
This all seems to be about calculating a reciprocal square root.
-
- Posts: 12542
- Joined: Wed Mar 08, 2006 8:57 pm
- Location: Redmond, WA USA
Re: For the bit tweakers
Distance to mate?cms271828 wrote:Interesting, but when would you use an inverse square root in a chess engine, I don't think I use them in mine.
G,D,R