Home

Programming for newbie

(Still under construction, more helps coming soon :D )

 

c/c++

 

 

1- DOWNLOAD A C++ COMPILER

-There are a lot a good free c/c++ compiler

I could recommend you some free compiler for windows. (click below to download them)

Microsoft visual studio express 2005 

Bloodshed  dev-c++ 5.0 beta 9.2

Digitalmars C/C++ compiler v 8.49

MingGW (gcc for windows)

 

 

 

 

2- Tutorial

-There are a lot of good website that teach you  for free how to use the c++ language

I recommend these good website . You will find there easy tutorial to learn quickly

Click on the links to go to the tutorial website name (not a direct  link)
C++ Language Tutorial  www.cplusplus.com/doc/tutorial/
Cprogramming.com - Programming Tutorials: C++ Made Easy Cprogramming.com
Dev-C++ Tutorial www.geocities.com/uniqueness_template/
Visual C++ Tutorial www.functionx.com/visualc/
online C++ tutorial www.intap.net/~drw/cpp/

It should take you 2 or 3 weeks to read and understand .

 

3- Steps to make a chess engine + helps

 

Some chess engine author like Tord Romstad, Richard Allbert, and many others... tried to explained from their experience some steps to follow to reach your goal.

Take a look at the website I add below it will be very helpful for Newbie.

 

Authors

Links

Tord Romstad

CCC forum

Borko Boskovic

BBChess+tutorial

Richard Allbert
   
Tom Kerrigan
Pham Hong Nguyen

 

D. Eppstein

board representation

Bruce Moreland

Bruce Moreland website

FD Laramee

Chess Programming by gamedev

Guy Robinson

Computer Chess

 Markus Gille /Ernst A. Heinz  

Dark Thought

D. Eppstein

board representation

Aarontay pages/SMK Meyer

UCI Interface&Protocol

Dr A. N. Walker

Computer Chess Theory

http://chess.verhelst.org/

Chess Tree Search

More links coming soon

 

After you read these very good tips you  could choose.

Some way to represent a chess board (Bitboard, Rotated board ...)

Teach to your chess engine the chess rules & a technique to choose your engine next move. How to move, to capture, to promote, under promote, en passant , 50 moves rules, draw by repetition, draw by insufficiency material to mate. teach to your chess engine some chess strategy and technique.( chess knowledge)

choose your protocol UCI or Winboard or both (shredderchess.com for uci protocole or look at Aaron pages UCI Interface&Protocol)

After to make your program stronger you could add SMP support or EGTB support ...Take a look at these strong chess program to see how they use EGTB & SMP

EGTB Support (you have to ask Pr Nalimov first to use his code)

Crafty, Arasan, Deep Frenzee, ...

SMP support :

Viper, Glaurung, Scorpio, Crafty ...

You could ask question to some chess engine authors at  CCC forum

All  These steps should take you like 6 months to some years :D ( lol )

You have a long way to go

Good luck !!!

 

4- How to compile

-Under Microsoft VS Express : (once you have a makefile :D )

Go to MS compiler command prompt . Then typed these two commands.

For language c

cl *.c
cl -o yourprogram.exe *.obj

or for Language Cpp engine

cl *.cpp
cl -o yourprogram.exe *.obj

or

1) open cmd.Exe
2) execute vcvars.bat (inside VC++ files) for path & others variables
3) do nmake in command line

To optimize your .exe

Bryan Hoffman : " I compile from the command line and no make files. Start out with this (note you will need the compiler that is able to do profile guided optimization (PGO) "

for  language c


cl /O2 /GL /c *.c
link /LTCG:PGI /PGD:yourprogram.pgd *.obj /RELEASE /out:yourprogram.exe

Now run your program thur some positions about 25 and analyze for 10 seconds each

link /LTCG:PGO /PGD:yourprogram.pgd /RELEASE *.obj

for language C++

cl /O2 /GL /c *.cpp
link /LTCG:PGI /PGD:yourprogram.pgd *.obj /RELEASE /out:yourprogram.exe

Now run your program thur some positions about 25 and analyze for 10 seconds each

link /LTCG:PGO /PGD:yourprogram.pgd /RELEASE *.obj