My chess application on X10

fguy64

New Member
Messages
218
Reaction score
0
Points
0
Greetings. I have written a chess program and set it up on X10. It's not particularly strong right now, but I hope to change that in the future. It's written in Sun Java.

I think this probably will be interesting to programmers who wish to to work on chess programming as a hobby, this project is a long long way from being competitive with any commercially available software that is out there.

Thanks.

http://fchess.x10hosting.com
 

dhruv227

New Member
Messages
390
Reaction score
1
Points
0
I hated that long lecture type intro on the given webpage but i liked the chess, anyways i won the game but i hated the graphics.
 

fguy64

New Member
Messages
218
Reaction score
0
Points
0
I hated that long lecture type intro on the given webpage but i liked the chess, anyways i won the game but i hated the graphics.

Yeah, most people hate to read any kind of instructions or description or manual about software, that's why I put the link to the game at the top of the page.

Duly noted on the graphics. The pieces are kind of lame. I'm a relative beginner at programming, but a life long chess enthusiast, and this program is a project to making learning programming more fun.

The chess engine itself is very weak. anyone above beginner level should be able to defeat the program.

thanks for your comments.I intend to continuously improve the program, it will probably be a lifetime project.
 

trike97

New Member
Messages
5
Reaction score
0
Points
0
It looks good, but the computer is too easy. Played 3 games, and twice he moved his queen to front row of my pawns, and one game i managed to queen a pawn moving no other pieces except the pawn.
 

fguy64

New Member
Messages
218
Reaction score
0
Points
0
It looks good, but the computer is too easy. Played 3 games, and twice he moved his queen to front row of my pawns, and one game i managed to queen a pawn moving no other pieces except the pawn.

Thanks trike97, yeah you are right, the program is too easy as an opponent. I kind of doubt it will ever be competitive with other established chess programs, but you never know. That's one of the things I intend to improve over time. I have a lot of ideas for improving the playing strength, but I wanted to get started by posting something that worked, and then proceed from there.

This is a longterm project for me, I hope to connect with java programmers who would be interested in collaborating on a project like this.

Trike, do you recall if you were playing the program with the "think" checkbox selected? When unselected, the program plays randomly, but when selected, there is a simple material algorithm which should prevent the program from just giving up its queen.
 

zen-r

Active Member
Messages
1,937
Reaction score
3
Points
38
Hehe. Thanks for this. Your program tempted me into playing chess again for the first time in years!

My moment of glory after winning was short-lived when I remembered that I had been playing in the most easy of your 3 levels!

You have done really well to program the game even to this level. Chess is notorious for the complexities required to work out long-term & far-reaching strategies, so I don't envy you your task of trying to refine the game play.

An easy upgrade I might suggest would be the addition of an optional timer, of the type used in proper competitive chess. You could keep it simple & go for a basic, automatic digital affair, or really go to town & have fun designing the graphics for the old-fashioned analogue push-button type - and require the player to remember to push the button themself after their move, as per the real game. Annoying when one forgets to stop the timer!


Please click my Reputation button
reputation.gif
(at the corner of this post) & make me :) -it costs you nothing!

If I've traded services/credits with you, please remember to leave iTrader Feedback. Thanks.​
 
Last edited:

fguy64

New Member
Messages
218
Reaction score
0
Points
0
thanks zen-r. Sure A timer is a good idea, it could be programmed as an option, people can use it if they want. The whole point is to come up with ideas where I can learn something about programming at the same time.

A biggie will be to introduce threads. If you are familiar with threads in programming, then by using a thread I can make sure the computer is thinking and calculating even when it is its turn to move.

Improving the play will be tough. A good chess program uses recursive programming to calculate several moves ahead. I find recursion very difficult wrap my head around.

I'm also interested in modifying the site so that people can log in, and play against me or other opponents. It wouldn't be real time, but the games would be saved in a database. So you can log in and make a move when you have time, kind of like postal chess.

All this should keep me going for a few years.
 

Westcoast-Games

New Member
Messages
19
Reaction score
0
Points
0
Ah yes ...chess.

Ages since I played, but you game was indeed fun.

Programming wise it all seemed to worked, and as other mentioned - graphics, graphics, graphics.

That aside - keep up the good woork!
 

zen-r

Active Member
Messages
1,937
Reaction score
3
Points
38
I like your idea of logging in, playing against someone else, & saving. This would also be a much easier facility for you to program in, since the computer wouldn't have to work out any moves itself.

One stage on (& when your program is much cleverer) would be to then ask the human to decide if he had just played against another human, or the computer!

When developing the software to calculate moves, don't forget that not all moves need to be calculated. Certainly in the early stages of the game, a lot of set moves could be programmed in from classic game strategies. So the computer could, for example, go for a classic Karpov or Kasparov opening, playing as many moves as it can get away with until its competitor forces a deviation. And the computer could always be on the look-out for known, pre-programmed positions for which it already knows the winning moves :)

(Edit: I've just added an extra thought to my last post here)
 
Last edited:

fguy64

New Member
Messages
218
Reaction score
0
Points
0
I like your idea of logging in, playing against someone else, & saving. This would also be a much easier facility for you to program in, since the computer wouldn't have to work out any moves itself.

One stage on (& when your program is much cleverer) would be to then ask the human to decide if he had just played against another human, or the computer!

When developing the software to calculate moves, don't forget that not all moves need to be calculated. Certainly in the early stages of the game, a lot of set moves could be programmed in from classic game strategies. So the computer could, for example, go for a classic Karpov or Kasparov opening, playing as many moves as it can get away with until its competitor forces a deviation. And the computer could always be on the look-out for known, pre-programmed positions for which it already knows the winning moves :)

(Edit: I've just added an extra thought to my last post here)

true enough about pre-programming standard opening moves to save on calculation time. However, I am of the opinion that if a person does not really understand the position that results from a particular opening sequence, then it is not really productive to spend time learning the sequence. It's a common mistake among humans to learn certain opening sequences without having any real understanding of the resulting positions. I think the same applies to chess programs, at least to this chess program. When I do manage to give my program the ability to choose a good opening position over a bad position, then I'll start dealing with pre-defined openings.

Problem is, there are just too many different ways to play the opening moves well.

I'll always remember the following passage from a chess book I read many years ago, loosely quoted it said "...there are more ways to play the first 12 moves of a game of chess than there are raindrops that would fall on greater Chicago in over a decade." Of course not all of those ways are good, but you get the idea.

All this being said, no doubt it will be a useful learning experience to set up a small opening database.
 
Last edited:

ichwar

Community Advocate
Community Support
Messages
1,454
Reaction score
7
Points
0
hmmmm, as soon as I've got some time, I shall try and beat it on lvl 3. I think I could do that since I can beat the shredder engine on lvl 1.
 

fguy64

New Member
Messages
218
Reaction score
0
Points
0
hmmmm, as soon as I've got some time, I shall try and beat it on lvl 3. I think I could do that since I can beat the shredder engine on lvl 1.

It should be a piece of cake. It has zero concept of strategy. I'd like to make it better, but that requires some advanced recursive algorithms that at this point just make my head spin. There won't be an significant improvements until late in the year.
 
Top