Main
Date: 30 Jan 2009 23:50:59
From: Gianluca Cisana
Subject: Chess Applet
Hello to all,

I've made an applet that play chess (currently it search at a fixed
deep of 6 half-moves), you can find it here:

http://chess.pcriot.com

comments are welcome.

Gianluca




 
Date: 01 Feb 2009 11:32:32
From:
Subject: Re: Chess Applet
On Jan 30, 5:50=A0pm, Gianluca Cisana <[email protected] > wrote:
> Hello to all,
>
> I've made an applet that play chess (currently it search at a fixed
> deep of 6 half-moves), you can find it here:
>
> http://chess.pcriot.com
>
> comments are welcome.
>
> Gianluca

I just observed a serious technical glitch. After 1.Nf3 e6 2.d4 Nf6
3.e3 Bb4+?! 4.c3 Bd6?! 5.Bd3 0-0 6.e4 Be7 7.0-0 Nc6 8.Qe2 d6 9.e5 Nd5
10.Qe4 f5, I played 11.exf6, capturing en passant. However, the
program did not then make a move. The little circles on the board
indicated it wanted to play 11...Rxf6, but it did not actually move
the rook, and furthermore it said "It's your turn."
Since it seemed to want to play 11...Rxf6, even though that loses, I
went ahead and moved the black rook, expecting that it either would
not allow it, or would accept that as its own move. To my surprise it
allowed it, and then it started playing White! Taking control of my
pieces, it continued, as I would have, 12.Qxh7+ Kf8 13.Qh8+ Kf7
14.Ng5#.
So, Gianluca, that leaves you with several questions to investigate:

1. Why did it want to play 11...Rxf6?? instead of 11...Nxf6!
2. Why did it not make any move after 11.exf6?
3. Why did it switch colors in mid-game?


  
Date: 02 Feb 2009 14:38:37
From:
Subject: Re: Chess Applet
On Feb 2, 2:16=A0pm, Gianluca Cisana <[email protected] > wrote:
> =A0 I've played exactly your moves against the applet but it plays
> correctly Nxf6. Probably yesterday I've made same changes to the applet
> that casually have fixed the problem. Can you confirm that now this bug
> is resolved?

Yes. Today it played 11...Nxf6 and did not try to switch colors.

> Yesterday I've added the feature of displaying the captured pieces on
> the left of the board.
> For your other messages on the weakness of the chess engine I need more
> time to study... I'm better in programming than playing chess :-)
>
> Bye, Gianluca
>
> [email protected] ha scritto:
>
>
>
>
>
> > =A0 I just observed a serious technical glitch. After 1.Nf3 e6 2.d4 Nf6
> > 3.e3 Bb4+?! 4.c3 Bd6?! 5.Bd3 0-0 6.e4 Be7 7.0-0 Nc6 8.Qe2 d6 9.e5 Nd5
> > 10.Qe4 f5, I played 11.exf6, capturing en passant. However, the
> > program did not then make a move. The little circles on the board
> > indicated it wanted to play 11...Rxf6, but it did not actually move
> > the rook, and furthermore it said "It's your turn."
> > =A0 Since it seemed to want to play 11...Rxf6, even though that loses, =
I
> > went ahead and moved the black rook, expecting that it either would
> > not allow it, or would accept that as its own move. To my surprise it
> > allowed it, and then it started playing White! Taking control of my
> > pieces, it continued, as I would have, 12.Qxh7+ Kf8 13.Qh8+ Kf7
> > 14.Ng5#.
> > =A0 So, Gianluca, that leaves you with several questions to investigate=
:
>
> > =A0 1. Why did it want to play 11...Rxf6?? instead of 11...Nxf6!
> > =A0 2. Why did it not make any move after 11.exf6?
> > =A0 3. Why did it switch colors in mid-game?- Hide quoted text -
>
> - Show quoted text -



   
Date: 03 Feb 2009 20:47:55
From: Gianluca Cisana
Subject: Re: Chess Applet
Very good.
Thank you for the confirmation.

Gianluca

[email protected] ha scritto:
> On Feb 2, 2:16 pm, Gianluca Cisana <[email protected]> wrote:
>> I've played exactly your moves against the applet but it plays
>> correctly Nxf6. Probably yesterday I've made same changes to the applet
>> that casually have fixed the problem. Can you confirm that now this bug
>> is resolved?
>
> Yes. Today it played 11...Nxf6 and did not try to switch colors.
>


  
Date: 02 Feb 2009 20:16:14
From: Gianluca Cisana
Subject: Re: Chess Applet
I've played exactly your moves against the applet but it plays
correctly Nxf6. Probably yesterday I've made same changes to the applet
that casually have fixed the problem. Can you confirm that now this bug
is resolved?
Yesterday I've added the feature of displaying the captured pieces on
the left of the board.
For your other messages on the weakness of the chess engine I need more
time to study... I'm better in programming than playing chess :-)

Bye, Gianluca


[email protected] ha scritto:
>
> I just observed a serious technical glitch. After 1.Nf3 e6 2.d4 Nf6
> 3.e3 Bb4+?! 4.c3 Bd6?! 5.Bd3 0-0 6.e4 Be7 7.0-0 Nc6 8.Qe2 d6 9.e5 Nd5
> 10.Qe4 f5, I played 11.exf6, capturing en passant. However, the
> program did not then make a move. The little circles on the board
> indicated it wanted to play 11...Rxf6, but it did not actually move
> the rook, and furthermore it said "It's your turn."
> Since it seemed to want to play 11...Rxf6, even though that loses, I
> went ahead and moved the black rook, expecting that it either would
> not allow it, or would accept that as its own move. To my surprise it
> allowed it, and then it started playing White! Taking control of my
> pieces, it continued, as I would have, 12.Qxh7+ Kf8 13.Qh8+ Kf7
> 14.Ng5#.
> So, Gianluca, that leaves you with several questions to investigate:
>
> 1. Why did it want to play 11...Rxf6?? instead of 11...Nxf6!
> 2. Why did it not make any move after 11.exf6?
> 3. Why did it switch colors in mid-game?


 
Date: 01 Feb 2009 09:23:20
From:
Subject: Re: Chess Applet
On Jan 30, 5:50=A0pm, Gianluca Cisana <[email protected] > wrote:
> Hello to all,
>
> I've made an applet that play chess (currently it search at a fixed
> deep of 6 half-moves), you can find it here:
>
> http://chess.pcriot.com
>
> comments are welcome.
>
> Gianluca

I found a few more weaknesses. It's unduly fond of pawn-grabbing and
early queen moves in the opening. I was able to capitalize on that
here:

1.d4 c5 2.d5 Qa5+?!

The early queen sortie.

3.Bd2 Qb6 4.Nc3 Qxb2??

The pawn grab. Now major material loss is forced, but apparently
since it occurs at 7 ply, one beyond the program's horizon, it does
not see it.

5.Rb1 Qa3 6.Nb5 Qxa2 7.Nc7+ Kd8 8.Nxa8

A rook for two pawns. I'll take that most any day.

8...Na6 9.Ra1 Qb2 10.Rxa6

In some earlier games I wasted time and another pawn or two trying
to extricate the knight, and your program was able to use its big,
mobile queenside majority to good effect. So this time I decided to
trade in my advantage of a rook for the advantage of a minor piece,
along with breaking up the queenside pawns.

10...bxa6 11.Ba5+ Ke8 12.Nc7+ Kd8 13.Nxa6+ Ke8 14.Nc7+ Kd8 15.Nb5+

15.Ne6+ Ke8 16.Nxc5 was a good alternative.

15...Ke8 16.e4 Qa2 17.Bd2 a5

Your program does love to advance passed pawns, but here the lone a-
pawn is no threat, and by going to a5 it loses any chance of repelling
the strongly posted Nb5. Meanwhile Black is neglecting development,
and his queen is in danger of getting trapped.

18.Ne2 e6 19.Nec3 Qb2 20.Bc4

Shoot, I missed a chance to win the queen here: 20.Bc1 Qb4 21.Ba3.
Oh well, White is still winning handily.

20...Nf6?

This loses more material. Better 20...Be7, though it would make no
major difference.

21.e5 exd5 22.exf6 dxc4

From bad to worse. Now the roof caves in.

23.Qe2+ Kd8 24.Bg5 Qa1+

The sort of ostrich-like behavior often seen in early programs. With
doom close at hand, the program makes whatever moves it can to push
disaster beyond its horizon of awarneness.

25.Kd2 Ba6 26.fxg7+ f6 27.Bxf6+ Kc8 28.Qe8+ Kb7 29.Qxd7+ Kb8 30.Qc7+
Ka8 31.Qa7# 1-0

So, clearly more work to be done. However, this is still a good
start, in my opinion. It's beaten me several times. When I got
careless, and made a mistake that it could sense within its 6-ply
horizon, it pounced like a cat.


 
Date: 31 Jan 2009 12:55:12
From:
Subject: Re: Chess Applet
On Jan 30, 5:50=A0pm, Gianluca Cisana <[email protected] > wrote:
> Hello to all,
>
> I've made an applet that play chess (currently it search at a fixed
> deep of 6 half-moves), you can find it here:
>
> http://chess.pcriot.com
>
> comments are welcome.
>
> Gianluca

It's not bad. It does need a better opening book; for example it
kept playing (as Black) 1.d4 c5 2.d5 Qa5+, and then later losing a
rook or the exchange to a knight fork at c7. But even after losing
such material, it could beat me if I got sloppy. It certainly knows
about advancing a pawn majority in the endgame, and seems to have some
idea of logical development and control of the center.
I would say it is miles ahead of where Sanny's "Getclub" program was
when it first debuted here, and may even be better than Getclub is
now. Plus it also plays reasonably quickly, unlike Getclub, which can
drag on for hours. It would be interesting to pit these two Java
applets against each other.
Can it be made to play White? It seemed to have no option but for
the opponent to make the first move.


  
Date: 01 Feb 2009 00:05:02
From: Gianluca Cisana
Subject: Re: Chess Applet
The applet doesn't have an opening book at all. All moves in the opening
are selected only evaluating the position and it don't differentiate the
opening from the middle game. The evaluating function change only for
the end game. I'll add a simple opening book in the future because
without it the applet plays always the same moves over and over. A big
opening book I think will slow the start of the applet.

In the future I plan to add:
- Show captured pieces
- Time management
- A simple opening book to randomize the games
- Possibility to play also with the black

Today I've added a circle that indicate the last move of the computer.

Thank you for your review, Gianluca


[email protected] ha scritto:
> On Jan 30, 5:50 pm, Gianluca Cisana <[email protected]> wrote:
>> Hello to all,
>>
>> I've made an applet that play chess (currently it search at a fixed
>> deep of 6 half-moves), you can find it here:
>>
>> http://chess.pcriot.com
>>
>> comments are welcome.
>>
>> Gianluca
>
> It's not bad. It does need a better opening book; for example it
> kept playing (as Black) 1.d4 c5 2.d5 Qa5+, and then later losing a
> rook or the exchange to a knight fork at c7. But even after losing
> such material, it could beat me if I got sloppy. It certainly knows
> about advancing a pawn majority in the endgame, and seems to have some
> idea of logical development and control of the center.
> I would say it is miles ahead of where Sanny's "Getclub" program was
> when it first debuted here, and may even be better than Getclub is
> now. Plus it also plays reasonably quickly, unlike Getclub, which can
> drag on for hours. It would be interesting to pit these two Java
> applets against each other.
> Can it be made to play White? It seemed to have no option but for
> the opponent to make the first move.


  
Date: 31 Jan 2009 13:11:47
From:
Subject: Re: Chess Applet
On Jan 31, 3:55=A0pm, [email protected] wrote:
> On Jan 30, 5:50=A0pm, Gianluca Cisana <[email protected]> wrote:
>
> > Hello to all,
>
> > I've made an applet that play chess (currently it search at a fixed
> > deep of 6 half-moves), you can find it here:
>
> >http://chess.pcriot.com
>
> > comments are welcome.
>
> > Gianluca
>
> =A0 It's not bad. It does need a better opening book; for example it
> kept playing (as Black) 1.d4 c5 2.d5 Qa5+, and then later losing a
> rook or the exchange to a knight fork at c7. But even after losing
> such material, it could beat me if I got sloppy. It certainly knows
> about advancing a pawn majority in the endgame, and seems to have some
> idea of logical development and control of the center.
> =A0 I would say it is miles ahead of where Sanny's "Getclub" program was
> when it first debuted here, and may even be better than Getclub is
> now. Plus it also plays reasonably quickly, unlike Getclub, which can
> drag on for hours. It would be interesting to pit these two Java
> applets against each other.
> =A0 Can it be made to play White? It seemed to have no option but for
> the opponent to make the first move.

Here's a game that shows some of its strengths and weaknesses:

1. e4 d5 2. d4

I decided to try for tactical complications with a Blackmar-Diemer
Gambit, rather than play it as a Scandinavian (2.exd4). Your program
could have transposed to a French Defense with 2...e6, but it chose to
satisfy my whim.

2...dxe4 3. Nc3 Nf6 4. f3 exf3 5. Nxf3 e6 6. Bg5 Bb4 7. Bd3 c5

Interesting. It's playing a seldom-seen but probably sound variation
of the Euwe Defense.

8. O-O cxd4

So, heck, what's another pawn? With the BDG you don't sweat the
small stuff.

9. Ne4 a6 10. Ne5 Be7 11. Qe2 Nbd7

It has played quite well to this point. With the possible exception
of 9...a6, this is all known theory. It looks like White's initiative
is going to dissipate.

12. Bxf6 gxf6??

A critical mistake. With the natural 12...Nxf6 it would have had
some advantage, with prospects of making its pawn plus tell
eventually. I think its limited 6-ply horizon prevented it from seeing
the flaws in this move.

13. Nxf7! Kxf7 14. Ng5+ Kg8 15. Qxe6+ Kg7 16. Qf7+ Kh6 17. Ne6 Qg8 18.
Qxe7 Qg4 19. Rf3

This is the real killer, which it could not foresee back at move 12.

19...Kh5 20. Rh3+ Qxh3 21. Qf7+ Kh4 22. gxh3 h5 23. Qg6 Rg8 24.Qxg8
Ne5 25.Qg3#