PDA

View Full Version : Applet to play chess online agaist the computer



Zuril
30-07-2009, 05:33 AM
Hello,

I've made an applet to play chess games online against the computer, if you want to play you can find it here:

http://bremboce.cisana.com

the features are:

- Play with white or black
- 4 level of difficulty
- Standar chess, Wild variants and Chess960 or Random Fischer but without castling
- A simple opening book
- Elegant graphics
- Captured pieces are showed next to the board
- It's free, no need to register or download any software to play

Zuril

Desmond
30-07-2009, 09:39 AM
Does it have draw mechanisms built in, eg triple rep, and computer agreeing to draw if the game is dead?

Kevin Bonham
30-07-2009, 04:43 PM
Needs more variety (or less greed) in opening play. For instance as Black on Average level after 1.e4 e5 it repeatedly allows the following hack-attack:

1.e4 e5 2.Nf3 Nc6 3.Nc3 Nf6 4.Bb5 Nd4 5.Nxd4 exd4 6.e5 dxc3 7.exf6 cxd2+? This is known to give white too much play 8.Bxd2 Qxf6 9.0-0 Qxb2 10.Re1+ Be7 11.Qe2 0-0 12.Bd3 Re8 13.Qh5 g6 14.Qh6 d5 15.h4 c5 16.h5 c4 17.hxg6 fxg6 18.Bxg6 hxg6 19.Qxg6+ Qg7 20.Qxe8+ Bf8 21.g3 c3 22.Bf4 Qh7 23.Re5 Qxc2 24.Rg5+ Kh7 25.Qf7+ Kh6 26.Qh5# 1-0

Note that white's play here isn't even actually any good; I missed an easier win by 11.Rb1 with Bb4 to follow winning bishop. 13.Bg5 also wins for white and black can win with 17...hxg6 and if 18.Bxg6 Qg7.

Kevin Bonham
30-07-2009, 05:31 PM
Does it have draw mechanisms built in, eg triple rep, and computer agreeing to draw if the game is dead?

It does have at least some ability to recognise triple rep. I obtained a won position against it then deliberately repeated moves:


55. f1f5 h3h4
56. g6g5+ h4h3
57. g5g1 h3h4
58. g1g5+ h4h3
59. g5g1 h3h4
60. g1g5+ h4h3
61. g5g1 h3h4
62. g1g5+ 1/2-1/2

...but in this instance it should have recognised the draw after W60, W62 was the fourth time that position had occurred.

It does not allow promotion to pieces other than queen. It recognises insufficient material draws.

Being able to play through the game and view previous positions would be nice but this doesn't seem to be possible.

Kevin Bonham
31-07-2009, 02:23 AM
It does not allow promotion to pieces other than queen.

However it underpromoted to knight in a lost position!

Zuril
31-07-2009, 02:34 AM
Does it have draw mechanisms built in, eg triple rep, and computer agreeing to draw if the game is dead?

Yes the applet can identify draw for:
- 3 repetition
- 50 moves rules
- not enought material to mate

but I haven't implemented a way to propose a draw to the computer.

http://bremboce.cisana.com

Zuril

Zuril
31-07-2009, 02:36 AM
However it underpromoted to knight in a lost position!

Argh! This is a bug :rolleyes:

Zuril
31-07-2009, 02:49 AM
It does have at least some ability to recognise triple rep. I obtained a won position against it then deliberately repeated moves:

...but in this instance it should have recognised the draw after W60, W62 was the fourth time that position had occurred.

It does not allow promotion to pieces other than queen. It recognises insufficient material draws.

Being able to play through the game and view previous positions would be nice but this doesn't seem to be possible.

You can select all the moves on the right of the board and then copy (CTRL+C) and paste them in a GUI like Arena to save the game in pgn format or review it.

I confirm that is not possible to promote to other pieces other than queen.

When I will have spare time I'll check the 3 repetition identification routine.

Thanks for the suggestions and bug reporting,

Zuril

http://bremboce.cisana.com