chess, artificial intelligence, horizon effect

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

lech
Posts: 1136
Joined: Sun Feb 14, 2010 10:02 pm

chess, artificial intelligence, horizon effect

Post by lech »

When I read about the horizon effect in chess I found a scientist article (pdf) with the following position:
[d]1k6/3p4/1B6/4Pp1p/1p5R/1p4p1/pP3n2/K6n w - - bm Rxh1;
In fact it is very, very tough position for chess engines and even Sting-sf-481 can't get it.
Also it is a fact that it is rather an easy, to guess solution, position for chesspleyers.

I tried to modify Sting's code and this important for scientist position, as example giving some rigths to work at artificial inteligence can be solved in less than 2 minutes on old dual core.
This modification is very interesting (safe) and I will use it the next version.
It is a pity but I can't find this article again.

Code: Select all

info depth 21 multipv 1 score cp -949 nodes 21288739 nps 769351 time 27671 pv h4b4 b8a8 b4c4 f2d3 c4c8 a8b7 c8c3 h1f2 c3b3 b7c6 b6a7 h5h4 b3b6 c6d5 b6d6 d5e5 d6d7 g3g2 a7d4 e5e4 d7g7 h4h3 d4f2 d3f2 a1a2 e4f3
info depth 22
info currmove h4b4 currmovenumber 1
info depth 22 multipv 1 score cp -937 lowerbound nodes 22236752 nps 773048 time
28765 pv h4b4
info nodes 22236752 nps 773048 time 28765
info currmove h4b4 currmovenumber 1
info depth 22 multipv 1 score cp -925 lowerbound nodes 22579927 nps 773205 time
29203 pv h4b4
info currmove h4b4 currmovenumber 1
info depth 22 multipv 1 score cp -907 lowerbound nodes 22900752 nps 773438 time
29609 pv h4b4
info nodes 22900752 nps 773438 time 29609
info currmove h4b4 currmovenumber 1
info depth 22 multipv 1 score cp -879 lowerbound nodes 23217615 nps 774333 time
29984 pv h4b4
info currmove h4b4 currmovenumber 1
info depth 22 multipv 1 score cp -838 lowerbound nodes 23634748 nps 776513 time
30437 pv h4b4
info nodes 23634748 nps 776513 time 30437
info currmove h4b4 currmovenumber 1
info nodes 24688596 nps 776835 time 31781
info currmove b6f2 currmovenumber 2
info currmove h4h5 currmovenumber 3
info currmove e5e6 currmovenumber 4
info currmove h4g4 currmovenumber 5
info currmove h4h2 currmovenumber 6
info currmove h4f4 currmovenumber 7
info currmove b6e3 currmovenumber 8
info currmove h4h3 currmovenumber 9
info currmove h4c4 currmovenumber 10
info currmove h4d4 currmovenumber 11
info currmove b6d4 currmovenumber 12
info currmove b6c7 currmovenumber 13
info currmove b6d8 currmovenumber 14
info currmove b6c5 currmovenumber 15
info currmove b6a5 currmovenumber 16
info currmove b6a7 currmovenumber 17
info currmove h4e4 currmovenumber 18
info currmove h4h1 currmovenumber 19
info depth 22 multipv 1 score cp -838 nodes 100997005 nps 974206 time 103671 pv h4h1 f2h1 e5e6 d7e6 b6c7 b8b7 c7g3 f5f4 g3f2 f4f3 f2h4 b7c6 h4g3 e6e5 g3h4 c6d5 h4f2 d5e6 f2h4 e6f5 h4e1 f5f6 e1g3 f6g6 g3f2 g6g5 f2e1 g5g6 e1f2
Maybe, I can't be friendly, but let me be useful.
User avatar
hgm
Posts: 27808
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: chess, artificial intelligence, horizon effect

Post by hgm »

I don't think this has anything to do with horizon effect, but just that the engine does not recognize a draw pattern that is easily recognized by humans.

One evaluation heuristic here that would hugely help is to recognize the stalemate threat: there is only a single black piece that has legal moves, namely the Bishop. (That information can be an almost free side result of move generation.) Hence the Bishop is iron. The evaluation then should take note of this before counting itself rich with passers. Because an iron Bishop can pick one of the two diagonals it is on, which then discounts all your Pawns that still have to pass that diagonal. So the three passers (e,f,h) are worth zilch for as long as the Bishop is on the e1-h4 diagonal. If it is slightly smarter, it could also disregard the Knight, as it is trapped by an iron Bishop. That should be enough to get the score in the draw range.

This is knowledge of the type that would make the engine much better at Chess, but would not increase its Elo.

Note that recognition of stalemate threats also helps for recognizing rabid-Rook situations.
Gurcan Uckardes
Posts: 196
Joined: Wed Oct 29, 2014 12:42 am

Re: chess, artificial intelligence, horizon effect

Post by Gurcan Uckardes »

I think HG is right. Here in this position the chess knowledge counts more.
My blog for Android users: http://chesstroid.blogspot.com
lech
Posts: 1136
Joined: Sun Feb 14, 2010 10:02 pm

Re: chess, artificial intelligence, horizon effect

Post by lech »

I think HG is not right. It is impossiblE (time) to describe such positions.
I used search and as you can see it gives wondefull effect. 8-)
It may be useful that I added in previous versions a stalemate detection to qsearch. :)

What about the other aspect: scientist use chess and engines to prove that an artiffical intelligence is needed (?)
Maybe, I can't be friendly, but let me be useful.
User avatar
hgm
Posts: 27808
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: chess, artificial intelligence, horizon effect

Post by hgm »

Well, I just explained how it could be done without any observable slowdown.

What you consider 'wonderful' is of course by absolute standards quite awful: 2 minutes of search. To see something that materializes at 7 ply! 20 msec would have been a more reasonable result.
lech
Posts: 1136
Joined: Sun Feb 14, 2010 10:02 pm

Re: chess, artificial intelligence, horizon effect

Post by lech »

hgm wrote:Well, I just explained how it could be done without any observable slowdown.

What you consider 'wonderful' is of course by absolute standards quite awful: 2 minutes of search. To see something that materializes at 7 ply! 20 msec would have been a more reasonable result.
Believe me it is possible, but what about the other question:
scientists use chess and engines to prove that an A.I. is needed (?)
Maybe, I can't be friendly, but let me be useful.
User avatar
hgm
Posts: 27808
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: chess, artificial intelligence, horizon effect

Post by hgm »

What exactly is the question? It seems like a statement to me.

And it also seems to me that this problem is not beyond solving by humans. So obviously no A.I. is needed to solve it. Who needs to solve Chess problems anyway?
User avatar
hgm
Posts: 27808
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: chess, artificial intelligence, horizon effect

Post by hgm »

lech wrote:

Code: Select all

info depth 22 multipv 1 score cp -838 nodes 100997005 nps 974206 time 103671 pv h4h1 f2h1 e5e6 d7e6 b6c7 b8b7 c7g3 f5f4 g3f2 f4f3 f2h4 b7c6 h4g3 e6e5 g3h4 c6d5 h4f2 d5e6 f2h4 e6f5 h4e1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Kb7 Rb4 Nd3 Rxb3
  5	 -3.76 	5643    	0:00.00	Rxb4 Kc8 Rc4+ Kb7 Rb4 Nd3 Rxb3
  4	 -3.84 	2252    	0:00.00	Rxb4 Kc8 Rc4+ Kb7 Be3
  3	 -3.52 	749      	0:00.00	Rxb4 Nd3 Rxb3
  2	 -3.52 	475      	0:00.00	Rxb4 Nd3 Rxb3
  2	 -4.04 	238      	0:00.00	Rxh5 g2 Rg5
  1	 -3.48 	21        	0:00.00	Rxh5
lech
Posts: 1136
Joined: Sun Feb 14, 2010 10:02 pm

Re: chess, artificial intelligence, horizon effect

Post by lech »

hgm wrote:What exactly is the question? It seems like a statement to me.

And it also seems to me that this problem is not beyond solving by humans. So obviously no A.I. is needed to solve it. Who needs to solve Chess problems anyway?
The question is:

Scientists use chess and chess engines to prove that people need an artifical intelligence, of course not to solve chess problems. :lol:

What do you think about it?

Here are the (any) scientist (?)

BTW. The move Rxh1 solves this position, move Rxb4 maybe but I doubt.
Score, excluding ZERO and mates mens rather nothing.
Maybe, I can't be friendly, but let me be useful.
peter
Posts: 3186
Joined: Sat Feb 16, 2008 7:38 am
Full name: Peter Martan

Re: chess, artificial intelligence, horizon effect

Post by peter »

hgm wrote:[Btw, it is debatable whether this is the correct solution.
Hi!
It's a position I know but pity not as for the source I got it from, somehow in my unclear remembrance about it, I think it to be connected with the name of Arpad Rusz, but maybe only because he could have brought it to this forum once upon a atime.

In my database it's called 8th step to heaven and the main variant is something like this:


[FEN "1k6/3p4/1B6/4Pp1p/1p5R/1p4p1/pP3n2/K6n w - - 0 1"]

1. Rxh1 Nxh1 2. e6 dxe6 3. Bc7+ Kb7 4. Bxg3 e5 5. Be1 e4 6. Bh4 e3 7. Bf2 f4 8. Be1 e2 9. Bg3 f3 10. Bf2


After exchanging the Rook against the Knight, the Bishop has to keep the remaining Knight at h1 with the threat of stalemate when getting captured
Peter.