Page 1 of 3

Chess

Posted: 09 Jun 2007 14:05
by Dust
I had to write a chess program for one of my classes. Unfortunately it was a C# .Net class, so I had to use that...

Here's what I have done so far: Loading is not implemented yet (at least not for the format it saves :), the AI is rather dumb (I lose allways anyway...) and there might be countless bugs. Comments? :)

(It requires .Net 2.0 to run I think)

http://outland.dnsalias.net/dl/Chess.exe

Posted: 09 Jun 2007 14:16
by Seppel
To run this application, you must first install one of the following versions of the .NET Framework: v2.0.50727..

now talking about chess anyway ... damn that chess on Vista sure isn't easy :s :(

Posted: 09 Jun 2007 14:24
by Dust
Yes, it requires .Net. Microsofts pittifull attempt in copying the Idea of Java...

Posted: 09 Jun 2007 15:34
by Esoteric
if you loose to vista chess easy mode you just cant play chess :lol:

as its way too dumb on easy to even compete :) and i hardly ever play chess, i did 3 games just to check it out :)

i do like the poker game :)

Posted: 09 Jun 2007 15:38
by Seppel
Esoteric wrote:if you loose to vista chess easy mode you just cant play chess :lol:

as its way too dumb on easy to even compete :) and i hardly ever play chess, i did 3 games just to check it out :)

i do like the poker game :)
at what lvl do you play it?

Posted: 09 Jun 2007 17:03
by Esoteric
i dont play it i played it twice on easy and once on medium

Posted: 11 Jun 2007 12:25
by Colyn
The AI is truly awful :) Hugely aggressive with the queen, doesn't understand asset exchanges. Doesn't seem to value promoting pawns i.e. would rather go after loose pawns with its king. Promoted pieces cannot move. Pawns can move two places when they get to 5 (white) and 4 (black). Oh and it doesn't understand draw through repitition. Needs new graphics for pieces as well, hard to distinguise king/queen/bishop. Apart from that, it's very good :oops:

Posted: 11 Jun 2007 12:27
by Colyn
Oh yea, the "thinking" thread needs to check for UI input such as undo.

Posted: 11 Jun 2007 12:38
by Stormwern
Why don't you post the vastly superior chess game you apparently have made colyn.

Posted: 11 Jun 2007 14:18
by Colyn
I wouldn't know where to start Storm. Dust asked for comments; I bothered to take a look and post them.

Now climb back into your box and try to think of something useful to say.

Posted: 11 Jun 2007 14:41
by Dust
Colyn wrote:The AI is truly awful :) Hugely aggressive with the queen, doesn't understand asset exchanges. Doesn't seem to value promoting pawns i.e. would rather go after loose pawns with its king. Promoted pieces cannot move. Pawns can move two places when they get to 5 (white) and 4 (black). Oh and it doesn't understand draw through repitition. Needs new graphics for pieces as well, hard to distinguise king/queen/bishop. Apart from that, it's very good :oops:
Yes, the AI is almost purely material based, with a hint on board controll (which is why it uses it's queen early: lots of controll...)

That promoted pieces can't move is strange. Hmm... Maybe I forgot to insert it into the player... oh well... fixed in the next version :)

Pawns should only be able to move two pieces at the start, as their first move. More time with the debuger I guess...

Draws have not yet been implemented.

I like the graphics, searched for hours (because they would be very ugly if I had made them myself :), and it is unlikely they get replaced. Maybe I could attach labels.

Thanks for the feedback :)

Edit: I have no idea how to implement repetition detection... maybe a hash table of past situations?

Posted: 11 Jun 2007 14:50
by Grumthorn
Dust wrote: Edit: I have no idea how to implement repetition detection... maybe a hash table of past situations?
Very low priority fix tbh, that along with NNK V K end games and the suchlike should probably be the end of the list of fixes.

Posted: 11 Jun 2007 15:00
by Colyn
Dust wrote:Yes, the AI is almost purely material based, with a hint on board controll (which is why it uses it's queen early: lots of controll...)
If nothing else, it certainly has an aspect of "shock and awe". Had me freaked out for quite a while.
That promoted pieces can't move is strange. Hmm... Maybe I forgot to insert it into the player... oh well... fixed in the next version :)
I'm pretty sure the opposition didn't move their promoted piece either.
Pawns should only be able to move two pieces at the start, as their first move. More time with the debuger I guess...
:)
I like the graphics, searched for hours (because they would be very ugly if I had made them myself :), and it is unlikely they get replaced. Maybe I could attach labels.
There's no shortage of "assets" on the intertron, I'll find some and post links.
Thanks for the feedback :)
Pleasure.
Edit: I have no idea how to implement repetition detection... maybe a hash table of past situations?
It's been a while since I played chess properly but I do remember there being some subtleties regarding repetition rule (possibly something to do with castling). In it's basic form, if the same position occurs 3 times, the game can be declared a draw. Here's a link to the FIDE rules..

http://www.chessvariants.com/fidelaws.html

Posted: 11 Jun 2007 15:28
by Dust
Colyn wrote:Oh yea, the "thinking" thread needs to check for UI input such as undo.
That's intentionally not allowed, since thinking works by trying out all possibilities (with alpha-beta pruning), and changes the board/move stack. Maybe I should separate that... but it's better from a design standpoint now. (The AI Player component just gets the possible moves from all it's pieces, and gives them to the board to perform them, which he then passes to an evaluation function)

Posted: 11 Jun 2007 16:07
by Colyn
From a UI and usability point of view, that's a mistake. If I decide that I want to undo my last move, there is no valid reason why I should not be able to interrupt the computers thinking process rather than having to sit there waiting for it to finish.