Moderator: Andres Valverde
FEN: 3q2R1/2P5/1k1B4/4np2/1NPK1Pr1/1R6/PP1N1Q2/3q2b1 w - - 0 1
+-a--b--c--d--e--f--g--h-+ MS Visual Studio C++ Version 13.10
8 | ::: [q] :::<R>:::|
7 |::: <P> ::: ::: | Testscenario searching for:
6 | [k] <B> ::: :::| undirected chess threats
5 |::: ::: [n][p]::: |
4 | <N><P><K> <P>[r]:::| Test #: 00
3 |:::<R>::: ::: ::: |
2 |<P><P> <N> <Q> :::| Test Count: 750000*64
1 |::: :::[q]::: [b] | per Second: 69767441
=>+-a--b--c--d--e--f--g--h-+ Time: 0.688 sec
bR bR bR -- bR bR bR --
bK bK bP bR bP bN bR --
bK -- bK bR -- bR bR --
bP bK bP -- -- -- bR --
-- -- bN -- bP bR bP bR
-- bR -- bN -- bR bR --
-- -- bR bR bR bB bR bB
bR bR bR -- bR bR bR --
FEN: 3R4/b1N1Q3/2B4K/r2P3b/pB1k2p1/1qR1p3/1Nn5/6n1 w - - 0 1
+-a--b--c--d--e--f--g--h-+ MS Visual Studio C++ Version 13.10
8 | ::: <R> ::: :::|
7 |[b] <N> <Q> ::: | Testscenario searching for:
6 | :::<B>::: ::: <K>| undirected chess threats
5 |[r] :::<P>::: :::[b]|
4 |[p]<B> [k] :::[p]:::| Test #: 01
3 |:::[q]<R> [p] ::: |
2 | <N>[n]::: ::: :::| Test Count: 750000*64
1 |::: ::: ::: [n] | per Second: 61381074
=>+-a--b--c--d--e--f--g--h-+ Time: 0.782 sec
-- bB -- -- bB -- -- --
bR -- -- -- -- bB -- --
bR bP -- -- -- -- bB --
-- bR bK bK bK -- -- --
bR bR bK bB bK -- bP --
bR bP bP bK bP bP -- bP
bP bR bP bP bN bP -- --
bN -- -- -- bN -- -- --
FEN: 3k4/8/8/2N4b/6n1/8/5P2/R3K2R w KQ - 0 1
+-a--b--c--d--e--f--g--h-+ MS Visual Studio C++ Version 13.10
8 | ::: [k] ::: :::|
7 |::: ::: ::: ::: | Testscenario searching for:
6 | ::: ::: ::: :::| undirected chess threats
5 |::: <N> ::: :::[b]|
4 | ::: ::: :::[n]:::| Test #: 02
3 |::: ::: ::: ::: |
2 | ::: ::: <P> :::| Test Count: 750000*64
1 |<R> ::: <K> :::<R>| per Second: 93023255
=>+-*--b--c--d--*--f--g--*-+ Time: 0.516 sec
-- -- bK -- bK -- -- --
-- -- bP bK bP bB -- --
-- -- -- -- -- bN bB bN
-- -- -- -- bN -- -- --
-- -- -- -- -- -- bP --
-- -- -- -- bN -- -- --
-- -- -- -- -- bN -- bN
-- -- -- -- -- -- -- --
FEN: K1RBB1bn/1Q2p2q/pP4p1/k5r1/3N1pp1/2P5/1N1n4/r7 w - - 0 1
+-a--b--c--d--e--f--g--h-+ MS Visual Studio C++ Version 13.10
8 |<K>:::<R><B><B>:::[b][n]|
7 |:::<Q>::: [p] :::[q]| Testscenario searching for:
6 |[p]<P> ::: :::[p]:::| undirected chess threats
5 |[k] ::: ::: [r] |
4 | ::: <N> [p][p]:::| Test #: 03
3 |::: <P> ::: ::: |
2 | <N> [n] ::: :::| Test Count: 750000*64
1 |[r] ::: ::: ::: | per Second: 64000000
=>+-a--b--c--d--e--f--g--h-+ Time: 0.750 sec
-- -- -- -- -- -- bR bR
-- -- -- -- bR bP bR bP
bK bK -- bP bB bP bP bR
bR bP bR bR bR bP -- bP
bK bP bB -- bN -- bR bR
bR bB -- -- bP bP bP bP
bR -- -- -- -- -- -- bR
-- bR bR bR bR bR bR bR
FEN: 8/p7/8/1P6/4B3/P6p/5K1k/8 w - - 0 1
+-a--b--c--d--e--f--g--h-+ MS Visual Studio C++ Version 13.10
8 | ::: ::: ::: :::|
7 |[p] ::: ::: ::: | Testscenario searching for:
6 | ::: ::: ::: :::| undirected chess threats
5 |:::<P>::: ::: ::: |
4 | ::: :::<B>::: :::| Test #: 04
3 |<P> ::: ::: :::[p]|
2 | ::: ::: <K> [k]| Test Count: 750000*64
1 |::: ::: ::: ::: | per Second: 146341463
=>+-a--b--c--d--e--f--g--h-+ Time: 0.328 sec
-- -- -- -- -- -- -- --
-- -- -- -- -- -- -- --
-- bP -- -- -- -- -- --
-- -- -- -- -- -- -- --
-- -- -- -- -- -- -- --
-- -- -- -- -- -- bK bK
-- -- -- -- -- -- bP --
-- -- -- -- -- -- bP bK
Reinhard Scharnagl wrote:During which phases of a chess program you need attack tables? I have written a very fast legal move generator with acceptable presort of the generated moves, without having anything like attack tables.
before discussing where I would like to have attack tables or not, I repeat my basic question:
During which phases of a chess program you need attack tables? Why?
Capture generation (in qsearch or in normal search if you separate cap/noncap gen)
Evaluation (attacked squares around the king, weak points...)
In check detection
Reinhard Scharnagl wrote:Well Peter,
before discussing where I would like to have attack tables or not, I repeat my basic question:
During which phases of a chess program you need attack tables? Why?
Regards, Reinhard.
It is very unclear, how this should be accomplished.
a) how should this happen using a persistant table?
b) why are there advantages compared to use good presorted moves?
c) what is the reason to use a persistant table here?
d) what is the reason to use a persistant table here?
Reinhard Scharnagl wrote:a) why attack tables have to be persistent?
b) how and why keeping them up to date?
c) why are there advantages compared to calculate things dynamicly?
d) what are advantages of the use of attack tables compared to other ideas, e.g. a good move ordering or the generation of fully informed legal only moves?
Sune Fischer wrote:Initially a table like that produces a big slowdown, probably a factor 2-3 in raw node speed. I think such a large speeddrop is hard to regain, but YMMV.
Although all of those subroutines do become faster it's still the bottom line that counts, and at least in frenzee it is overall faster to use on-the-fly detection. Particularly in the endgame the attack tables seem like a poor investment.
it's hard do follow a thread here!
a) why attack tables have to be persistent?
The only reason I can think of is performance.
b) how and why keeping them up to date?
That's the key question if you are going to use it! IMO they should be saved when the information is first generated and that's normally in the movegenerator. I don't think one should try to keep them completely updated all the time. The trick is how to do this.
c) why are there advantages compared to calculate things dynamicly?
The only one I can think of is performance.
The drawback is complexity. The program becomes more complex and vulnerable to bugs.
d) what are advantages of the use of attack tables compared to other ideas, e.g. a good move ordering or the generation of fully informed legal only moves?
Different programs are written with different styles and ideas. What's good for one program mustn't be good for another. These tables can be implemented in so many ways and must be evaluated for the specific program in mind. The only way to find out if it's good is to test it. The long and windy way...
Naturally chess programs differ (or should at last for to avoid being clons of each other). But when an idea is good, it does not depend on the program it implements. Therefore that is just the point I try to investigate: is using attack tables a good idea or not?
I'm afraid this is not correct. Good ideas do not necessarily work in all chess programs. Null move is a clearly accepted good idea, however Junior does not use it. It doesn't work for Amir's program.
Return to Programming and Technical Discussions
Users browsing this forum: No registered users and 31 guests