Chess programmer. Where do I start

Sort:
chessmaster102

What college classes have you taken and colleges/books that helped you create your own chess program ?

ElKitch

I dont know for chess specifically, but this site is awesome (and free): http://www.codecademy.com/

ajttja

I am taking the JHU (john hopkins University) online course for Web design, that will teach you the basics after that they have another, more complicated, course and one that teaches javascript.

EDIT: this teaches html, im not sure if this is what you want to learn

chessmaster102

Thank you and what is CTY

EscherehcsE

I'd guess an introductory course in C programming couldn't hurt.

waffllemaster

Just learn a programming language, you don't necessarily have to go to school for it.  Like anything, the more you practice / learn, the more you can do.

Java is a good one to start with, and I think on chess.com the play -> computer is a java program.

I don't know enough to do it myself though, so I can't be more specific.  I'm sure there are programming forums.  They'd have good tips on how to start.

chessmaster102

@Izko it seems you've had some bad experience in cheating but that's no reason to show ignorance towards a goal of mine. I plan to create my own program as tool of improvement not as a cheating tool

FancyKnight
Izko wrote:

ohh no we have another future cheatter...

I doubt anybody goes through the trouble of making their own chess program simply to cheat.

Wilbert_78

If you already know how to code in any language, check this site:
http://chessprogramming.wikispaces.com/

Derekjj

People think that a 13 year old without taking classes can program. It is more to it than that. These kids would never survive in an IT environment out in the real world. Programming classes would definately help

Fairy_Princess

Learn Python.

Derekjj

Contact a local college and do some research.

Fairy_Princess

Or just follow the free guidance and materials available over any OCW course.  If your only goal is to learn to program well, hard to go wrong learning through MIT.

jonnin

a lot of programming classes these days favor bloat to get nice looking code over speed.  But in the guts of a chess engine, speed is important, even on a hot PC.   The faster it runs, the more depth you can get in the same amount of time.   So you might get some older performance oriented books and know-how to go with it.  Not saying to code the thing in assembly language, but realtime c++ type code would be good.

Once learning the basics of programming, the thing to do is see if you can find an opensource game engine to study.  Or 3 or 4 of them.   Also, there are standards --- many interface programs can use any engine that uses the standard I/O protocol, so you want to be compatible with these for your engine portion.  Probably, there is a free library that speaks this protocol out there somewhere.   A LOT of modern software is done by pulling in existing tools from all over, often free tools but some cost, and putting it together in a new way.  "From scratch" just takes too long if it can be avoided. 

You need some rough knowledge of game programming also.  Not only to do the graphics, but concepts like pruning (discarding lines to reduce the computations needed, for example, if moving to X results in your immediate checkmate, you can ignore the possible other lines your opponent could take there and assume he will find the mate, discard these lines to save time).  You also have concepts like the opening database (rather than try to invent openings with your engine, just make the next move from the list). 

Not to smash your dreams or discourage you, but I would say starting smaller is better.  Make a tic tac toe game first, and you will learn a ton from it (it also has transposition tables, move lists, lot of the concepts needed in chess are in there, simplified).

wasted_youth
chessph wrote:

People think that a 13 year old without taking classes can program. It is more to it than that. These kids would never survive in an IT environment out in the real world. Programming classes would definately help

You're joking. I used to play a browser game; there was a 14 year old there who was a genius with Java and who just ran rings round the site programmers; he was always top of the highscore and they just couldn't prove anything. In the end he got bored and posted a list of programming loopholes in the forum, hinting that he knew of many more. He stopped playing soon after that because they'd employed him.

Derekjj
wasted_youth wrote:
chessph wrote:

People think that a 13 year old without taking classes can program. It is more to it than that. These kids would never survive in an IT environment out in the real world. Programming classes would definately help

You're joking. I used to play a browser game; there was a 14 year old there who was a genius with Java and who just ran rings round the site programmers; he was always top of the highscore and they just couldn't prove anything. In the end he got bored and posted a list of programming loopholes in the forum, hinting that he knew of many more. He stopped playing soon after that because they'd employed him.

Obviously, if he is a genius.

Derekjj
wasted_youth wrote:
chessph wrote:

People think that a 13 year old without taking classes can program. It is more to it than that. These kids would never survive in an IT environment out in the real world. Programming classes would definately help

You're joking. I used to play a browser game; there was a 14 year old there who was a genius with Java and who just ran rings round the site programmers; he was always top of the highscore and they just couldn't prove anything. In the end he got bored and posted a list of programming loopholes in the forum, hinting that he knew of many more. He stopped playing soon after that because they'd employed him.

If I was an employer, I am not going to hire a kid just because they can make a ball bounce around the screen.

chessmaster102

seeing as how im not a coding genius lol I will look into the college classes

chessmaster102
jonnin wrote:

a lot of programming classes these days favor bloat to get nice looking code over speed.  But in the guts of a chess engine, speed is important, even on a hot PC.   The faster it runs, the more depth you can get in the same amount of time.   So you might get some older performance oriented books and know-how to go with it.  Not saying to code the thing in assembly language, but realtime c++ type code would be good.

Once learning the basics of programming, the thing to do is see if you can find an opensource game engine to study.  Or 3 or 4 of them.   Also, there are standards --- many interface programs can use any engine that uses the standard I/O protocol, so you want to be compatible with these for your engine portion.  Probably, there is a free library that speaks this protocol out there somewhere.   A LOT of modern software is done by pulling in existing tools from all over, often free tools but some cost, and putting it together in a new way.  "From scratch" just takes too long if it can be avoided. 

You need some rough knowledge of game programming also.  Not only to do the graphics, but concepts like pruning (discarding lines to reduce the computations needed, for example, if moving to X results in your immediate checkmate, you can ignore the possible other lines your opponent could take there and assume he will find the mate, discard these lines to save time).  You also have concepts like the opening database (rather than try to invent openings with your engine, just make the next move from the list). 

Not to smash your dreams or discourage you, but I would say starting smaller is better.  Make a tic tac toe game first, and you will learn a ton from it (it also has transposition tables, move lists, lot of the concepts needed in chess are in there, simplified).

Thank you so much for this

waffllemaster

Yeah, there's no way you're going to make a chess engine right away.  There will be many many smaller projects first.