ec-2.9.1-2
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-1
Put the zipep file in the directory you want to install it.
cd directory you chose
unzip ec-2.9.1-2.zip
or whatever name you used for the download.
II) Compiling
=============
cd the intallation directory /ec-2.9.1-2 and type make.
III) How to use the pgm
=======================
To run the pgm type
./ec
you should get:
Licence GNU Copy Right Marc Dechico This programm is bugged and use pointers
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
Blanc= h Noir= m Niv= 4 Inc= 2 Pro Act: 0 Joueur: h
>
The pgm doesn't move automatically the piece, you have to move the pieces for
each side.
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 2,33 minutes to explore a tree of 6 levels
(l 6 2)from a normal starting chess board with -O3 compiler optimisation.
But the number of possibilities could be wrong because because of bugs
More initials moves you have, more time you will need.
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
N P DeAr Not M P m p! N P DeAr Not M P m p! N P DeAr Not M P m p
0 C B1C3 0 1 0 0 0!21 P D2D3 0 1 0 0 0!
1 C B1A3 -1 2 0 0 0!22 P D2D4 -1 1 0 0 0!
2 D D1E2 0 1 0 0 0!23 P E4E5 0 0 0 0 0!
3 D D1F3 0 7 0 0 0!24 P E4D5 0 3 0 0 0!
4 D D1G4 -4 32 0 0 0!25 P F2F3 0 0 0 0 0!
5 D D1H5 -1 7 0 0 0!26 P F2F4 -1 1 0 0 0!
6 R E1E2 -1 0 0 0 0!27 P G2G3 -1 1 0 0 0!
7 F F1E2 -1 0 0 0 0!28 P G2G4 -1 0 0 0 0!
8 F F1D3 0 1 0 0 0!29 P H2H3 -1 0 0 0 0!
9 F F1C4 -3 9 0 0 0!30 P H2H4 -1 0 0 0 0!
10 F F1B5 -1 1 0 0 0!
11 F F1A6 -3 2 0 0 0!
12 C G1H3 -1 1 0 0 0!
13 C G1E2 -1 0 0 0 0!
14 C G1F3 -1 0 0 0 0!
15 P A2A3 -1 2 0 0 0!
16 P A2A4 -1 2 0 0 0!
17 P B2B3 -1 1 0 0 0!
18 P B2B4 -1 2 0 0 0!
19 P C2C3 -1 1 0 0 0!
20 P C2C4 -1 1 0 0 0!
Nbr=30 Camp=0 Niv=6 Mei_mvt=0 Piece= C Dep=B1 Arr=C3
Blanc= h Noir= m Niv= 4 Inc= 2 Pro Act: 2 Joueur: h
>
Column N is the number of the initial move
Column P piece type(r:king, d:Queen, f:bishop, c:knight, p: Pawn)
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.
M Number of mat by the blancs.
P Number of Pat that the blancs have been able to do during the simulation.
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.
to print the board type: pb
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 possible.
The pgm consider that the first move is done by the white pieces.
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
V) Problemes
============
I have some bug to find.... the known one...
king was eaten
chess wasn't detected in some case
Some playing with the pawn wasn't allowed.
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)
|