Documentation for ec-3.0 (Upd Jan.04, 2002)
Home || To reach me
ec-3.0 

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-3.0 

Put the zipep file in the directory you want to install ec-3.0.
cd  directory you chose
unzip ec-3.0.zip 
or whatever name you used for the download.  

II) Compiling
=============
cd the intallation directory   and type make.
cd ec-3.0
make

III) How to use the pgm
=======================
After entering the ec-3.0 directory. 

Run the pgm by typing : 	./ec
-----------------------

you should get:

-----------------------------------------------------------------
Ec  version 3.0  Copyright (C) 2001 Marc Dechico
Ec comes with ABSOLUTELY NO WARRANTY.This is free software, and
you are welcome to redistribute it under certain conditions
See the file named GNU_Licence  provided with the pgm sources
To contribute to the efforts made    !          Marc DECHICO
by the author send encouragement     !          Kerfring
or a crossed check (10 Euros) to     !          29390 SCAER FRANCE
-----------------------------------------------------------------
  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  Help:Type h 
>

piece type r:king, d:Queen, f:bishop, t:rook, c:knight, p: Pawn.

You can either move the pieces for each side or ask the pgm to
do it.

Moving a piece(playing), type             : m E2 E4 
------------------------------------------
of course a pawn must be present on E2
The moves  are fully controlled so the pgm should'nt allow you to
type m f1 f3 with a bishop on f1!.....

Moving automatically a piece              : rm
------------------------------------------- 
The programme simulate the next moves, extract the best one and
move the piece.

Going back one move, type:	          : b 
------------------------------------------

Saving the game                           : fs
-------------------------------------------
For the momment you can't save a game in a specific file.

Loading a previously saved game           : fl
-------------------------------------------

Changing the side for the printing of the board: s h m 
------------------------------------------------
s h m Blank = (H)uman   Black= (M)achine

s m h Blank = (M)achine Black= (H)uman
 

Quitting the pgm                          : q
------------------------------------------

Printing the result, without moving type  : r
-------------------------------------------
you should  get at the end of the simulation: 
------------------------------------------------------------------------------
 N DeAr Not:   M:P:   m:p! N DeAr Not:   M:P:   m:p! N DeAr Not:   M:P:    m:p
 0 B1C3   0:   0:0:   0:0!21 D2D3   0:   0:0:   0:0!
 1 B1A3   0:   0:0:   1:0!22 D2D4   0:   0:0:   0:0!
 2 D1E2   0:   0:0:   0:0!23 E4E5   0:   0:0:   0:0!
 3 D1F3   0:   2:0:   0:0!24 F2F3   0:   0:0:   0:0!
 4 D1G4   0:   0:0:   0:0!25 F2F4   0:   0:0:   0:0!
 5 D1H5   0:   2:0:   0:0!26 G2G3   0:   0:0:   1:0!
 6 E1E2   0:   0:0:  11:0!27 G2G4   0:   0:0:   0:0!
 7 F1E2   0:   0:0:   0:0!28 H2H3   0:   0:0:   1:0!
 8 F1D3   0:   0:0:   0:0!29 H2H4   0:   0:0:   1:0!
 9 F1C4   0:   0:0:   0:0!
10 F1B5   0:   0:0:   0:0!
11 F1A6  -5:   0:0:   0:0!
12 G1H3   0:   0:0:   1:0!
13 G1E2   0:   0:0:   0:0!
14 G1F3   0:   0:0:   1:0!
15 A2A3   0:   0:0:   1:0!
16 A2A4   0:   0:0:   1:0!
17 B2B3   0:   0:0:   1:0!
18 B2B4  -1:   0:0:   1:0!
19 C2C3   0:   0:0:   1:0!
20 C2C4   0:   0:0:   1:0!
Mei_mvt:3->D1F3  Piece=D  Camp=0 Niv=6 8 
-----------------------------------------------------------------
Prv_Mvt:E7E6  Turn=White Curr_Deep=2 Lev=4 Inc=2 White=h Black=m  Help:Type h 
>
column N    Number of the move 
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.
Mei_mvt = 3 (Number of the best move) D1F3 (Best move)

Printing the board type: pb
------------------------
Useful if you want to see again the  board after printing results.

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)  

this time should increase after the two first moves. 

But the number of possibilities could be wrong because of  errors.
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.

For having the best response time choose l 3 0 or l 3 1

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 can either:

__ put each subsequent move in a file name ec.std (same directory than the pgm)
and  load it with  the commande fl (File Load), if you know all the move from the beginning.
All invalid moves will be tested and an error message will be printed.  			    	          
For a two move games type in the text file:
E2E4 + space + Enter
E7E6 + Space + Enter
If the pawn has to be tranformed to a Queen or Knight type 
E7E8D  (or E7E8C) + Enter 

__ 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 
============
I didn't get much problemes with this version; only when typing bad commandes.

If you  have also this problem just type anything and Enter (several time if needed 
until it prints again the sign >) and retype the commande. 

The analysing of the datas for choosing  the best move is much better than before, 
but need to be improved again.

VI) New functions
=================
To improve it again some  functions should be added :

_ number of pieces being under control by by each side
_ number of pieces being covered by each side.
- some different strategies could be chosen by the simulator
  like aggressive/risky or defensive/riskless depending on the
  situation
_ 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:
- Smart loosing by choosing some bad moves interresting for the player
_ 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) 



Home || Top