You are not logged in.
I have a new Flash version of Chess. It is still being developed, but I thought you would like to have a play with it.
Let me know how it performs.
"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman
Offline
I like watching two computers play against each other. Black seems to have a habit of making spectacular comebacks!
It's been working fine for me so far, and the computers don't spend too long thinking either.
Why did the vector cross the road?
It wanted to be normal.
Offline
1: e4 Nf6
2: Nc3 Nc6
3: Bb5 Ne4
4: Nxe4 e6
5: Nf3 Ke7
6: b3 Nb4
7: Ba3 d6
8: Bxb4 c5
9: Nxc5 f6
10: Ne4 Bd7
11: c4 Bb5
12: cxb5 Kf7
13: Kg1 Kg8
14: d4 Be7
15: Qd2 Rc8
16: Ba5 Qd7
17: b6 axb6
18: Bxb6 f5
19: Nc3 Qe8
20: d5 exd5
21: Qxd5 Kf8
22: Qxf5 Kg8
23: Qe6 Kf8
24: Nd5 Rc2
25: Rc1 Rc1
26: Rxc1 Qh5
27: Qxe7 Kg8
28: Rc8 Qxe8
29: Rxe8
I win!!
Offline
By the way, some of the moves are not very accurately recorded, particularly with the taking or non-taking of pieces. For example, the computers third move was recorded as 3: Ne4 when it ought to be N×e4 while its last move was recorded as 28: Q×e8 when it should be just Qe8. Wanna look into that, MathsIsFun?
Also my 25th move could have been less ambiguously recorded as 25: Rfc1 rather than just Rc1. And, of course, checks could be indicated by a +.
Offline
Thanks Jane.
Is the game slightly challenging? That is all it needs to be, really. Don't want to have it too hard for new players. (Though with limited compute-power, that is all it could be)
"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman
Offline
did you write the AI mathsisfun?
A logarithm is just a misspelled algorithm.
Offline
Good game, but...
The game allowed me, three times in a row, to move a random piece whilst in check. My king flashed during this, but I was still able to do it.
Last edited by Daniel123 (2008-03-21 11:39:43)
Offline
Is the game slightly challenging? That is all it needs to be, really. Don't want to have it too hard for new players. (Though with limited compute-power, that is all it could be)
The level is fine. The computer makes a mixture of good moves and unthinking moves this should suit new players to a T.
The game allowed me, three times in a row, to move a random piece whilst in check. My king flashed during this, but I was still able to do it.
Then this is a definite glitch that needs to be fixed! The rules of chess strictly forbid the moving of random pieces when the king is in check.
Offline
The computer played a solid game and then had a few brainfarts even allowing me to do a very simple checkmate?
Offline
Last game I just murdered the computer.
1: e4 Nc6
2: f4 Nf6
3: Nc3 d6
4: Nf3 Be6
5: Be2 h5
6: Bb5 Qd7
7: Kg1 Kc8
8: f5 Bxf5
9: exf5 Qf5
10: Bxc6 bxc6
11: Nd4 Qd7
12: Qf3 Nh7
13: Nxc6 Re8
14: Nxa7 Kd8
15: Qa8 Qc8
16: Qxc8
Maybe you should allow for different levels of play? Its too easy to beat.
Offline
I also just found out that the computer doesnt understand the rule of en passant.
Offline
42 turns, computer wins me. I went first.
Good learning tool!!
igloo myrtilles fourmis
Offline
I have the notation working better.
Valid moves when in Check could involve moving the King, blocking, or capturing ... so my best idea so far is to initially allow the move, then retract move if still in Check ... I have put this in the latest version (v0.7)
En Passant is hard! It involves undoing a move, doesn't it?
"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman
Offline
Well, if its a game for mostly new players, then I suppose you dont need to add en passant to it if its too hard to code. Many new players to chess dont understand en passant themselves so it is just as well not to confuse them.
BTW, the computer is murdered again:
1: d4 Nc6
2: e3 Nf6
3: Nf3 Nd5
4: Bc4 Nd4
5: Nxd4 c5
6: Bxd5 Qa5
7: Bd2 Qd2
8: Qxd2 e6
9: Be4 cxd4
10: Qxd4 Bd6
11: Qxd6 Kd8
12: Kg1 f5
13: Bd3 Ke8
14: Nc3 e5
15: Bxf5 Kd8
16: Nd5 g5
17: Qe7
It lost its queen at move 8. The notation is still not very good because line 7 should have been 7: Bd2 Qxd2 the × is still missing.
Last edited by JaneFairfax (2008-03-22 01:01:17)
Offline
Do you see "v0.7" ? You may have the older version cached.
My AI is mostly positional and piece-value. I thought of adding "piece is attacked/protected" scoring, but thought it may make the game too defensive.
So far it seems to make an interesting game.
And with "en passant" I may be able to make a "dummy piece" that sits behind the pawn, so it can be "taken". The code may end up a bit kludged, but I will have a go.
"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman
Offline
New Version (v0.72) posted ... handles en-passant.
Notation should be correct (except for "0-0" for castling).
I may leave the development about where it is, so long as it gives a reasonable game, but intend to come back in the future and improve it.
What I am missing is a simple "Rules of Chess" page.
"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman
Offline
v72 hung after I took rook with king:
1: d4 Nc6
2: e3 Nf6
3: c3 Nd5
4: Qf3 Nf4
5: Qxf4 f5
6: Qxf5 Nxd4
7: exd4 c5
8: dxc5 b5
9: Bxb5 Bb7
10: Bxd7+ Qxd7
11: Qxd7+ Kxd7
12: Nf3 Ke8
13: Na3 Bxf3
14: Rg1 Bb7
15: g4 Rd8
16: Rg3 a5
17: Be3 e6
18: Rd1 Rxd1+
19: Kxd1
igloo myrtilles fourmis
Offline
"hung" ... ? Did it say something like "taking too long"?
"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman
Offline
It happened to me as well. I got a dialogue box ssying an element in the script is causing things to run very slowly and asking me if I wanted to abort the script. Whether I click yes or no, the program hangs I cant make another move.
Offline
Some comments - first of all, I think it's great, the computer level is decent, and I can have an enjoyable game, however:
When the King castles on his side, it should say 0-0 instead of the square he moves to, and on the Queen side, the castle should show 0-0-0.
Game 1 (i'm white):
1: e4 Nc6
2: Nf3 Nf6
3: d3 d6
4: Be2 Be6
5: Bg5 Nd7
6: Kg1 Nc5
7: Nc3 a5
8: a3 h5
9: d4 Nd7
10: d5 Bxd5
11: exd5 Na7
12: b4 axb4
13: axb4 g6
14: Bb5 Nxb5
15: Rxa8 Qxa8
16: Nxb5 Kc8 (glancing at the list, this is the first time the black king has moved, so he infact jumps a square)
17: Nxd6+ exd6
18: c4 Bg7
19: Nd4 Bxd4
20: Qxd4 Re8
21: c5 dxc5
22: bxc5 dxc5 (ok this is pretty funny, for the first "dxc5", the black pawn spawns a clone of itself to attack )
23: Ra1 cxd4
24: Rxa8+ Nb8
25: g3 Re1+
26: Kg2 c5
27: dxc6 bxc6 (the en passant worked flawlessly)
28: Bf4 d3
29: Rxb8+ Kd7
30: Bd2 Re2
31: Bf4 c5
32: Rb7+ Kc6
33: Rxf7 Ka6 (a black rook has spawned on d5 as the king moves!)
34: Kf3
Then the Javascript freezes or something, so the game ends here. Pretty good game, apart from the fact black cheated when I was up... what a bad sport!
Game 2 (i'm black):
1: Nc3 e5
2: Nf3 Nc6
3: Nd5 Nf6
4: Nxf6+ Qxf6
5: c4 Bc5
6: e3 Kg8
7: Bd3 d6
8: Kg1 Bg4
9: Bxh7+ Kxh7
10: Qc2+ Kg8
11: d4 Bxf3
12: dxc5 Qg5
13: cxd6 Qxg2+
Technically everything worked well, black missed a very obvious checkmate threat at the end but I guess that's down to AI
Game 3 (i'm black - nothing interesting happens in this game until the end):
1: Nf3 c5
2: Nc3 Nc6
3: Ne4 d6
4: c4 Be6
5: b4 a6
6: bxc5 Bxc4
7: cxd6 exd6
8: Bb2 Be7
9: Bxg7 Bf6
10: Nxf6+ Nxf6
11: Bxf6 Qxf6
12: Rc1 Ne5
13: Nxe5 Bxe2
14: Bxe2 Qxe5
15: Qa4+ b5
16: Qb4 Kg8
17: Qg4+ Kh8
18: Kg1 Re8
19: Bd3 Rg8
20: Qh3 f5
21: Rc7 Re7
22: Rxe7 Qxe7
23: Qxf5 Rg5
24: Qc8+ Rg8
25: Qc3+ Rg7
26: Rc1 Qg5
27: Qc8+ Rg8
28: Qc3+ Rg7
29: Qc8+ Rg8
30: Qc3+ Qg7
31: Qxg7+ Rxg7
32: Rc8+ Rg8
33: Rxg8+ Kxg8
34: Ke1 Kf7
So I'm down a bishop and a pawn when white creates a rook on d1 and the game freezes, spookily on move 34 again.
However I've played another game since and I don't think move 34 is where the problem lies.
Last edited by Identity (2008-03-25 22:56:24)
Offline
Thanks guys ... looks like I have a little debugging work to do
"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman
Offline
AFAIK most of the bugs were caused by invalid castling attempts (with a Rook that had been captured).
I think I have fixed it now (v0.73)
"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman
Offline
You mean the computer was trying to make invalid castling moves? Not me I know enough of the rules of chess to even think of castling when Im aware its not allowed.
PS: I just made my first en passant move with the new software. Thanks!
Last edited by JaneFairfax (2008-03-28 22:06:43)
Offline
i never knew about the en passant move before o.O
The Beginning Of All Things To End.
The End Of All Things To Come.
Offline
You mean the computer was trying to make invalid castling moves? Not me ...
Yes, yes, the computer was the one doing the naughty things
Probably still has some more naughties waiting to spring on us, so let me know.
Oh, and castling should be correctly notated now.
"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman
Offline