ec-2.9.1-3
Published under GNU Licence see GNU_Licence file
Copyright : 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
ec-2.9.1-3
Put the zipep file in the directory you want to install it.
cd directory you chose
unzip ec-2.9.1-3.zip
or whatever name you used for the download.
II) Compiling
=============
cd the intallation directory and type make.
cd ec-2.9.1-3
make
III) How to use the pgm
=======================
Run the pgm by typing : ./ec
-----------------------
you should get:
This programm is not fully tested and use pointers
----------->You may damage your datas<-------------
Ec-2.9.1-3 Copy Right Marc Dechico
Published under GNU Licence
A file named GNU_Licence is provided with the source of this programm
Type h for help
AABBCCDDEEFFGGHH
+================+
8|ttccffddrrffcctt|8
7|pppppppppppppppp|7
6|## ## ## ## |6
5| ## ## ## ##|5
4|## ## ## ## |4
3| ## ## ## ##|3
2|PPPPPPPPPPPPPPPP|2
1|TTCCFFDDRRFFCCTT|1
+================+
AABBCCDDEEFFGGHH
Turn= White Curr.Deep.= 0 Lev= 4 Inc= 2 White= h Black= m
>
piece type r:king, d:Queen, f:bishop, t:rook, c:knight, p: Pawn.
The pgm doesn't move automatically the piece, you have to move the pieces for
each side.
Moving a piece(playing), 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!.....
Going back one move, type: b
--------------------------
You have to choose how deep you want the simulator to explore.
The default is 4 levels with an increment of 2 levels.
Starting the simultation, type: r
------------------------------
Printing the result, type: pm
--------------------------
you should get
DeAr Not: M: P: m: p!DeAr Not: M: P: m: p!DeAr Not: M: P: m: p
B1C3 0: 1: 0: 0: 0!D2D3 0: 1: 0: 0: 0!
B1A3 -1: 2: 0: 0: 0!D2D4 -1: 1: 0: 0: 0!
D1E2 0: 1: 0: 0: 0!E4E5 0: 0: 0: 0: 0!
D1F3 0: 8: 0: 0: 0!E4D5 0: 3: 0: 0: 0!
D1G4 -4: 32: 0: 0: 0!F2F3 0: 0: 0: 0: 0!
D1H5 -1: 8: 0: 0: 0!F2F4 -1: 1: 0: 0: 0!
E1E2 -1: 0: 0: 0: 0!G2G3 -1: 1: 0: 0: 0!
F1E2 -1: 0: 0: 0: 0!G2G4 -1: 0: 0: 0: 0!
F1D3 0: 1: 0: 0: 0!H2H3 -1: 0: 0: 0: 0!
F1C4 -3: 11: 0: 0: 0!H2H4 -1: 0: 0: 0: 0!
F1B5 -1: 1: 0: 0: 0!
F1A6 -3: 2: 0: 0: 0!
G1H3 -1: 1: 0: 0: 0!
G1E2 -1: 0: 0: 0: 0!
G1F3 -1: 0: 0: 0: 0!
A2A3 -1: 2: 0: 0: 0!
A2A4 -1: 2: 0: 0: 0!
B2B3 -1: 1: 0: 0: 0!
B2B4 -1: 2: 0: 0: 0!
C2C3 -1: 1: 0: 0: 0!
C2C4 -1: 1: 0: 0: 0!
Nbr=30 Camp=0 Niv=6 Mei_mvt=0 Piece= C Dep=B1 Arr=C3
Turn= White Curr.Deep.= 2 Lev= 4 Inc= 2 White= h Black= m
>
column De Starting field
column Ar Arriving field
+ new piece type for the pawn when arriving
on the last board's line.
(D:Queen, C:knight)
column Not Mark attributed by the simulator to the movment
It adds the better movements encountered during the simulation
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.
M Number of mat after chess by the whites.
P Number of pat that after chess by the whites.
m/p 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.....
I use it to choose among mouvements having the same mark.
Printing the board type: pb
------------------------
Modifying levels to 6 and and increment to 2, type: l 6 2
-----------------------------------------------------
The default level ( 4 2) should be enough to play with a 500 Mhz
On a PIII 733 and from a normal starting chess board (17 initial moves)
I need roughly:
2,30 minutes to explore a tree of 6 levels(l 6 2)
1 second to explore a tree of 4 levels (l 4 2)
But the number of possibilities could be wrong because of bugs
More initials moves you have, more time you will need (not linear!).
It's unpossible to stop the simulation but stoping the pgm by ^C .
So if you want a better simualtion increase the level step by step
for example if you are using l 4 2 try l 5 1, l 5 2, l 6 1, l 6 2.
It was possible with the Dos Version to stop by typing ESC (keyboard interrupt:
the code is still in the sources).
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. Don't choose a situation where the king is already chess.
I also don't give the possibility to memorize if rock is still possible.
The pgm consider that the first move is done by the white pieces.
The functin to modify is ech_deb() in 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 print 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
V) Problemes
============
The program isn't fully tested. The only way to be sure is to check the sources.
chess wasn't detected in some case and king was eaten
Some playing with the pawn wasn't allowed.
Thr simulation allowed some pawn move it shouldn't have
If you find other one, your message would be wellcome.
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.
VI) New functions
=================
To make it really a chess player a lot of functions should be added :
_choosing among the best moves having the same mark by analysing the new board situation:
number of chess/mat/pat detected
number of pieces being under control by by each side
number of pieces being covered by each side.
further more some different strategies could be chosen by the simulator
like aggressive/risky or defensive/riskless
_ avoiding to explore some parts of the tree when the lost of pieces is to high
_building an opening database for the first moves.
Some unexplored ideas:
_ Choosing some move in order to train the player using a specific piece
by counting which move involve more a piece than an other one
(for example detecting, when a chess or a taking occures,
if it's made by a given piece)
_ Exploring the tree to find some excpetionnal board situations where for example
a side having difficulties would win
_ Finding some tree parts where a side as more chances to win ,excluding of course
situations where a side has less pieces than the other.
(it was primarily one of the motivations for making this pgm)
|