Published under GNU Licence see GNU_Licencet
Copy right : Marc DECHICO
This is a first documentation version, just to explain how to use and compile the pgm.
Im a preparing a more detailed documentation.
I) Installing the pgm
A directory will be created by the unzip cde
All sources, objets and executables will be in one directory named
Put the zipep file in the directory you want to install it.
cd directory you chose
or whatever name you used for the download.
cd the intallation directory /ec291 and type make.
III) How to use the pgm
To run the pgm type
The pgm doesn't move automatically the piece, you have to move the pieces for
To play type: m E2 E4 (of course a pawn must be present on E2)
The moves are not fully controlled so the pgm would allow you to
type m f1 f3 with a bishop on f1!.....
You can go back by typing: b
You have to choose how deep you want the simulator to explore.
The default is 4 levels with an increment of 2 levels.
To choose 6 levels and an increment of 2 type:
l 6 2
On a PIII 733 I need roughly 3,75 minutes to explore a tree of 6 level
(l 6 2)from a normal starting chess board.
But the number of possibilities could be wrong because because of bugs
It's unpossible to stop the simulation but stoping the pgm by ^C .
It was possible with the Dos Version by typing ESC (keyboard interrupt:
the code is still in the sources).
To start the simultation type: r
To visualize the result type: pm
you should get
LMDeAr Not P0M0P1M1!LMDeAr Not P0M0P1M1!LMDeAr Not P0M0P1M1!LMDeAr Not P0M0P1M1
C0B1C3 0 0 0 0 0!
C0B1A3 0 0 0 0 0!
C0G1H3 0 0 0 0 0!
C0G1F3 0 0 0 0 0!
P0A2A3 0 0 0 0 0!
P0A2A4 0 0 0 0 0!
P0B2B3 0 0 0 0 0!
P0B2B4 0 0 0 0 0!
P0C2C3 0 0 0 0 0!
P0C2C4 0 0 0 0 0!
P0D2D3 0 0 0 0 0!
P0D2D4 0 0 0 0 0!
P0E2E3 0 0 0 0 0!
P0E2E4 0 0 0 0 0!
P0F2F3 0 0 0 0 0!
P0F2F4 0 0 0 0 0!
P0G2G3 0 0 0 0 0!
P0G2G4 0 0 0 0 0!
P0H2H3 0 0 0 0 0!
P0H2H4 0 0 0 0 0!
Nbr=19 Camp=0 Niv=2 Mei_mvt=0 Piece= C Dep=B1 Arr=C3
Blanc= h Noir= m Niv= 2 Inc= 0 Pro Act: 0 Joueur: h
Column L is the piece type(r:king, d:Queen, f:bishop, c:knight, p: Pawn)
Column M kind of movement
column De Starting field
column Ar Arriving field
column Not Mark attributed by the simulator to the movment
It add the better movements encountered during the simu
If the blanc take a pawn(1) at first level but the black are able to
take a bishop(3) at second level you will get a 1-3 = -2.
P0 Number of Pat that the blancs have been able to do during the simulation.
M0 Number of mat by the blancs.
P1/M1 Same thing but for the black.
These Pat/mat informations are note actually very reliable because they
are based also on bad moves that nobody would probably choose.
But you will see them increase when a side is having difficulties.....
IV) Modifying the pgm to test some chess-board situation
The pgm doesn't provide funtions to allow the player to
configure the board with a specific starting situation.
You have to modify the source file (ec_init.c) to put the pieces at
the place you want. I don't remember exactly but don't choose a situation
where the king is already chess. I also don't give the possibility to
memorize if rock is possible.
The functin to modify is init_pgm() from the source file ec_init.c
To add the king white on the A1 case
err =ajo_pie(0,'r',1,1); if (err != 0) printf("Erreur : %i\n",err);
! ! ! !
! ! ! !----- Line number (1 to 8)
! ! !--------Column number (1 to 8) for A to H
! !__________ Piece (King= r, Queen= d, Bishop = f, Knight = c,
! Rook = t, Pawn= p)
!------------- Side 0= white, 1= Black
You can also visualize the subsequent initial moves: the chees board will be
printed each time on the screen by uncomment somme instructions in the function
not_cal() at the end of the source file ec_simu.c
The function that is printing the chess-board is aff_ech(blanc) blanc side below
or aff_ech(noir) black below
I have some bug to find.... the known one...king no more eaten.
To much code has been copied, I should have put some code in specific functions.
A lot of things must be enhanced.....before going further.
To make it really a chess player a lot of functionalities should be added.