Basics of computer chess

Sort:
Avatar of pdve

Hi,

Where can I learn the basics of computer chess?

Plus are there any open source engines and is it worth it to try and look at the source code? :p

Avatar of sharepointme

I guess you could split your issue up:

1) Fronend: User interface, moving the pieces and so on...

2) Backend: Chessengine what you might be interested in.

so again to split up 2) =>

a) rules

b) board representation

c) search algorithm

d) evaluation function

You can start out by implementing the rules your self. Making up some sort of board representation (ex: array of integers). Google minimax as search algorithm for selecting moves and using an evaluation function that simply adds up the piece-values for black and white and subtracts them.

When you are done you could try to look into some code: stockfish is super hardcore. so dont start there. you could start with ex: http://www.tckerrigan.com/Chess/TSCP.

I have never done it... I have written the rules a few times but never really finish the job creating a full engine. Its a lot of work :)

Avatar of MrEdCollins

Do a search on "Stockfish" and "Crafty."  Those are two open-source engines.

And if you're not a computer programmer, then no, it won't do much good to look at the source code.

Avatar of pdve
MrEdCollins wrote:

Do a search on "Stockfish" and "Crafty."  Those are two open-source engines.

And if you're not a computer programmer, then no, it won't do much good to look at the source code.

I am a programmer. So I was trying to look into some relatively simple engines which I can understand and my goal is to be able to fine tune these engines and learn few things from how engines work so that I can myself play better.

Avatar of dzikus

You can find a bunch of useful links in this post: http://stackoverflow.com/questions/494721/what-are-some-good-resources-for-writing-a-chess-engine

You can check the Micro-Max engine which seems to be the smallest working chess program (less than 2K of source code in C)

Avatar of TetsuoShima

sorry to hijack the topic but just out of curiousity how long does it take to become programmer??? Can you ever be so good that you absolutly sure that you operating system is absolutly save and you antivirus isnt corrupt.

Can you as programmer ever manually like check what is flowing through the open ports and whats fishy and whats not??

Yes the question sound strange and im an absolute noob, but how long would it take to be absolutly proficient. to have a save computer and never need to put your faith in another person when it comes to computeR?

I mean so proficent that even if someone has direct access to your computer you can keep it save yourself.

Avatar of sharepointme

There is no way to be 100% safe if other people have access to your PC.

But what is really 100% safe? nothing I guess.

but you dont have to be a developer to know things like that. Its more like network/security specialist. Though it would not hurt to be a developer too :)

If you just want some more knowledge about computers and how they work... I guess it should be possible to take some course somewhere to learn more :)

Avatar of waffllemaster
TetsuoShima wrote:

sorry to hijack the topic but just out of curiousity how long does it take to become programmer??? Can you ever be so good that you absolutly sure that you operating system is absolutly save and you antivirus isnt corrupt.

Can you as programmer ever manually like check what is flowing through the open ports and whats fishy and whats not??

Yes the question sound strange and im an absolute noob, but how long would it take to be absolutly proficient. to have a save computer and never need to put your faith in another person when it comes to computeR?

I mean so proficent that even if someone has direct access to your computer you can keep it save yourself.

That's a bit like asking how long does it take to become a carpenter?  Can you ever build a house so well that no one can break into it?

Like many skills it takes practice to become good, and talent to become one of the best.  You can take a programming class and write a program in the very first week.  Just like I could take a hammer, some nails, and wood and make a crude chair.

Avatar of TetsuoShima

crude chair reminds me of my chess games;)

Avatar of TheLastSupper
pdve wrote:
MrEdCollins wrote:

Do a search on "Stockfish" and "Crafty."  Those are two open-source engines.

And if you're not a computer programmer, then no, it won't do much good to look at the source code.

I am a programmer. So I was trying to look into some relatively simple engines which I can understand and my goal is to be able to fine tune these engines and learn few things from how engines work so that I can myself play better.

Unless you can suddenly analyze millions of positions each second, then no way that knowing how chess engines will improve your skill.

TetsuoShima wrote:

sorry to hijack the topic but just out of curiousity how long does it take to become programmer??? Can you ever be so good that you absolutly sure that you operating system is absolutly save and you antivirus isnt corrupt.

Can you as programmer ever manually like check what is flowing through the open ports and whats fishy and whats not??

Yes the question sound strange and im an absolute noob, but how long would it take to be absolutly proficient. to have a save computer and never need to put your faith in another person when it comes to computeR?

I mean so proficent that even if someone has direct access to your computer you can keep it save yourself.

Becoming Chess world champion is suddenly realistic for everyone, comparing to your questions.

Avatar of TetsuoShima
SecretOfMana wrote:
pdve wrote:
MrEdCollins wrote:

Do a search on "Stockfish" and "Crafty."  Those are two open-source engines.

And if you're not a computer programmer, then no, it won't do much good to look at the source code.

I am a programmer. So I was trying to look into some relatively simple engines which I can understand and my goal is to be able to fine tune these engines and learn few things from how engines work so that I can myself play better.

Unless you can suddenly analyze millions of positions each second, then no way that knowing how chess engines will improve your skill.

TetsuoShima wrote:

sorry to hijack the topic but just out of curiousity how long does it take to become programmer??? Can you ever be so good that you absolutly sure that you operating system is absolutly save and you antivirus isnt corrupt.

Can you as programmer ever manually like check what is flowing through the open ports and whats fishy and whats not??

Yes the question sound strange and im an absolute noob, but how long would it take to be absolutly proficient. to have a save computer and never need to put your faith in another person when it comes to computeR?

I mean so proficent that even if someone has direct access to your computer you can keep it save yourself.

Becoming Chess world champion is suddenly realistic for everyone, comparing to your questions.


you think being the king of your pc and knowing whats going on is equal to being chess world champion??

Avatar of TheLastSupper
TetsuoShima wrote:

you think being the king of your pc and knowing whats going on is equal to being chess world champion??

My point is, designing an OS, with its applications, which cannot be hacked, is immune to viruses, designed by only YOU, is simply not possible.

If the devil would want to play a game with me, and I had to pick between these two, being world chess champion is still 'realistic'.

Avatar of LoekBergman
SecretOfMana wrote:
TetsuoShima wrote:

you think being the king of your pc and knowing whats going on is equal to being chess world champion??

My point is, designing an OS, with its applications, which cannot be hacked, is immune to viruses, designed by only YOU, is simply not possible.

If the devil would want to play a game with me, and I had to pick between these two, being world chess champion is still 'realistic'.

haha, you were too fast for me. This is my reaction:

What he means is that it is much easier to become world champion chess then to know what is going on on your pc!

I will add to it that the chance that you win with football against the complete team of FC Barcelona is bigger then that you can safeguard your pc. :-)

The first thing you have to do before you can try to control your own PC is to write a completely new Operating System from scratch. All current systems have serious security issues. That will cost you already decades to accomplish - if you will succeed. And that is only the first step and is the least complicated one, because you have that one under control. But how to implement a web server (necessary to get on the internet) that is secure yet using http and tcp? Wow, that is a really impossible combination. :-)

Nah, it is easier to beat Magnus Carlsen then to have a safeguarded pc.

Avatar of TetsuoShima

ok you made a good point.

Avatar of TetsuoShima

if its that hard how are companies save that use computers, or have to use computers?? cant than like everyone than not just hack their computer and steal their business??? How can you ever use a pc for important information??   How are you contacts ever safe if your customers order via e-mail??  even if you hire a computer professionals or more how do you even know they are trustworthy in the first place??

i mean isnt it like miami vice were someone looks for hidden microphones and could possible hide his own improved surveilance material?

Avatar of sharepointme

totally. when a company hires a person handling confidential data the company trusts this person not to steal it in any way. That particular person can chose to do it anyway (even though he might break an official agreement between him and the company). 

So its basically just a calculated risk when hireing people.

Basic advice is to: choose your passwords wisely (dont use "1234", "12345678", "admin", "love", "password", etc.) encrypt data when transmitting over the internet. Dont download and run software from a source you really dont trust/know. 

But it does not guarantee you to be safe :)