Chess
Moderator: Dust
- Dust
- The Boss
- Posts: 9093
- Joined: 01 Jan 1970 01:00
- Contact:
Chess
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
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
I do what I think is right. But I don't think that what I think is right can not be wrong.
-
- Posts: 903
- Joined: 01 Jan 1970 01:00
- Contact:
- Dust
- The Boss
- Posts: 9093
- Joined: 01 Jan 1970 01:00
- Contact:
-
- Die-hard
- Posts: 2216
- Joined: 01 Jan 1970 01:00
- Location: Amsterdam
- Contact:
-
- Posts: 903
- Joined: 01 Jan 1970 01:00
- Contact:
-
- Die-hard
- Posts: 2216
- Joined: 01 Jan 1970 01:00
- Location: Amsterdam
- Contact:
-
- Die-Harder
- Posts: 2721
- Joined: 01 Jan 1970 01:00
- Location: Cambridge, UK
- Contact:
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
Colyn | Warrior
Squirrels chase Magpies. It's true. I've seen it...
Squirrels chase Magpies. It's true. I've seen it...
-
- Die-Harder
- Posts: 2721
- Joined: 01 Jan 1970 01:00
- Location: Cambridge, UK
- Contact:
-
- Die-hard
- Posts: 1006
- Joined: 01 Jan 1970 01:00
- Location: Sweden
- Contact:
-
- Die-Harder
- Posts: 2721
- Joined: 01 Jan 1970 01:00
- Location: Cambridge, UK
- Contact:
- Dust
- The Boss
- Posts: 9093
- Joined: 01 Jan 1970 01:00
- Contact:
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...)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:
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?
I do what I think is right. But I don't think that what I think is right can not be wrong.
-
- Die-hard
- Posts: 2231
- Joined: 01 Jan 1970 01:00
- Location: Waterford, Ireland
- Contact:
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.Dust wrote: Edit: I have no idea how to implement repetition detection... maybe a hash table of past situations?
Every man's death diminishes me, for I am involved in all mankind.
Therefore, send not to know for whom the bell tolls; it tolls for thee.
Therefore, send not to know for whom the bell tolls; it tolls for thee.
-
- Die-Harder
- Posts: 2721
- Joined: 01 Jan 1970 01:00
- Location: Cambridge, UK
- Contact:
If nothing else, it certainly has an aspect of "shock and awe". Had me freaked out for quite a while.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...)
I'm pretty sure the opposition didn't move their promoted piece either.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...
There's no shortage of "assets" on the intertron, I'll find some and post links.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.
Pleasure.Thanks for the feedback
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..Edit: I have no idea how to implement repetition detection... maybe a hash table of past situations?
http://www.chessvariants.com/fidelaws.html
Colyn | Warrior
Squirrels chase Magpies. It's true. I've seen it...
Squirrels chase Magpies. It's true. I've seen it...
- Dust
- The Boss
- Posts: 9093
- Joined: 01 Jan 1970 01:00
- Contact:
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)Colyn wrote:Oh yea, the "thinking" thread needs to check for UI input such as undo.
I do what I think is right. But I don't think that what I think is right can not be wrong.
-
- Die-Harder
- Posts: 2721
- Joined: 01 Jan 1970 01:00
- Location: Cambridge, UK
- Contact:
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.
Colyn | Warrior
Squirrels chase Magpies. It's true. I've seen it...
Squirrels chase Magpies. It's true. I've seen it...
Who is online
Users browsing this forum: No registered users and 4 guests