Commit d5b98bfa authored by Radia EL HAMDOUNI's avatar Radia EL HAMDOUNI

Update README.txt

parent 805775ce
# chess_programming # chess_programming
This repository contains the source code for a chess engine written in C language. /*****************************************************************************************************\
This is a project that is part of the MLOD UV. ; ;
; +- author : Radia EL HAMDOUNI . ;
------------------------------------------------------------------------------------------------------------- ; +- start date : October 26th , 2020. ;
+- author : Radia EL HAMDOUNI . ; +- deadline : November 3rd , 2020. ;
+- start date : October 26th , 2020. ; +- Goal : Program the computer to play chess. ;
+- deadline : November 3rd , 2020. ;-----------------------------------------------------------------------------------------------------;
+- Goal : Program the computer to play chess. ; +- description : ;
+- description : ; - The user can play against the chess engine that will predict ;
- The user can play against the chess engine that will predict the best moves to win the game. ; the best moves to win the game. ;
; - The chess engine can also play itself for debug and test purposes . ;
+- Chess board representation : ; ;
/*****************************************************************************************************/
=> 0X88 board representation .
--------------------------
Ressources/documentation:
-------------------------
* https://web.archive.org/web/20130212063528/http://www.cis.uab.edu/hyatt/boardrep.html
* https://en.wikipedia.org/wiki/0x88
* https://decimal.info/hex-to-decimal/8/how-to-convert-0X88-to-decimal.html
+- ASCII art :
* https://www.asciiart.eu/sports-and-outdoors/chess
+- Chess symbols in Unicode :
* https://en.wikipedia.org/wiki/Chess_symbols_in_Unicode
+- Chess board notation :
=> Algebraic notation .
--------------------------
Ressources/documentation:
-------------------------
* https://en.wikipedia.org/wiki/Algebraic_notation_(chess)
----------------------------------------------------------------------------------------------------------- /*****************************************************************************************************\
/******************************************************************************************************\
; ; ; ;
; To compile the file use the command : ; ; To compile the file use the command : ;
; ; ; ;
...@@ -51,83 +24,105 @@ This is a project that is part of the MLOD UV. ...@@ -51,83 +24,105 @@ This is a project that is part of the MLOD UV.
; $ chess_engine ; ; $ chess_engine ;
; - To both compile and run the executable in the terminal : ; ; - To both compile and run the executable in the terminal : ;
; $ gcc chess_engine.c -o chess_engine && ./chess_engine ; ; $ gcc chess_engine.c -o chess_engine && ./chess_engine ;
; -------------------------------------------------------------------------------------------- ;
; + The goal is to program the computer to play chess against a user or against itself ;
; ;
; ;
; ; ; ;
/*****************************************************************************************************/ /*****************************************************************************************************/
/******************************************************************************************************\
/*****************************************************************************************************\
; +- Vocabulary :
; +- file is the column .
; +- rank is the line .
;
; +- Notation :
; +- Black pieces are referenced in the code with lower case letters .
; +- White pieces are referenced in the code with Upper case letters .
;
/*****************************************************************************************************/
/*****************************************************************************************************/
;
; +- Chess board representation : => 0X88 board representation .
;
; --------------------------
; Ressources/documentation:
; -------------------------
;
; * https://web.archive.org/web/20130212063528/http://www.cis.uab.edu/hyatt/boardrep.html
; * https://en.wikipedia.org/wiki/0x88
; * https://decimal.info/hex-to-decimal/8/how-to-convert-0X88-to-decimal.html
;
;
; - Chess board in bash console :
;
; 8 ♜ ♞ ♝ ♛ ♚ ♝ ♞ ♜
; 7 ♟︎ ♟︎ ♟︎ ♟︎ ♟︎ ♟︎ ♟︎ ♟︎
; 6 . . . . . . . .
; 5 . . . . . . . .
; 4 . . . . . . . .
; 3 . . . . . . . .
; 2 ♙ ♙ ♙ ♙ ♙ ♙ ♙ ♙
; 1 ♖ ♘ ♗ ♕ ♔ ♗ ♘ ♖
;
; a b c d e f g h
;
;
;
/*****************************************************************************************************/
/*****************************************************************************************************\
; ; ; ;
; +- To move a piece : ; ; +- Moving a piece (how it works): ;
; first empty the square. Example ==> board[e2]=e; ; ; first empty the square. Example ==> board[e2]=e; ;
; then move the pieces . Example ==> board[e4] = P; ; ;
;
; 8 ♜ ♞ ♝ ♛ ♚ ♝ ♞ ♜ ;
; 7 ♟︎ ♟︎ ♟︎ ♟︎ ♟︎ ♟︎ ♟︎ ♟︎
; 6 . . . . . . . .
; 5 . . . . . . . .
; 4 . . . . ♟︎ . . .
; 3 . . . . . . . .
; 2 ♙ ♙ ♙ ♙ . ♙ ♙ ♙
; 1 ♖ ♘ ♗ ♕ ♔ ♗ ♘ ♖
;
; a b c d e f g h
;
; then move the pieces . Example ==> board[e4] = P;
;
; 8 ♜ ♞ ♝ ♛ ♚ ♝ ♞ ♜
; 7 ♟︎ ♟︎ ♟︎ ♟︎ ♟︎ ♟︎ ♟︎ ♟︎
; 6 . . . . . . . .
; 5 . . . . . . . .
; 4 . . . . . . . .
; 3 . . . . . . . .
; 2 ♙ ♙ ♙ ♙ . ♙ ♙ ♙
; 1 ♖ ♘ ♗ ♕ ♔ ♗ ♘ ♖
;
; a b c d e f g h
;
;
; ; ; ;
; ; ; ;
/*****************************************************************************************************/ /*****************************************************************************************************/
----------------------------------------------------------------------------------------------------------
- Chess board representation :
8 ♜ ♞ ♝ ♛ ♚ ♝ ♞ ♜
7 ♟︎ ♟︎ ♟︎ ♟︎ ♟︎ ♟︎ ♟︎ ♟︎
6 . . . . . . . .
5 . . . . . . . .
4 . . . . . . . .
3 . . . . . . . .
2 ♙ ♙ ♙ ♙ ♙ ♙ ♙ ♙
1 ♖ ♘ ♗ ♕ ♔ ♗ ♘ ♖
a b c d e f g h
- Example of moving pieces :
8 ♜ ♞ ♝ ♛ ♚ ♝ ♞ ♜
7 ♟︎ ♟︎ ♟︎ ♟︎ ♟︎ ♟︎ ♟︎ ♟︎
6 . . . . . . . .
5 . . . . . . . .
4 . . . . ♙ . . .
3 . . . . . . . .
2 ♙ ♙ ♙ ♙ . ♙ ♙ ♙
1 ♖ ♘ ♗ ♕ ♔ ♗ ♘ ♖
a b c d e f g h /*****************************************************************************************************/
; +-Ressources :
8 ♜ ♞ ♝ ♛ ♚ ♝ ♞ ♜ ;
7 ♟︎ ♟︎ ♟︎ ♟︎ ♟︎ . ♟︎ ♟︎ ; +- ASCII art :
6 . . . . . ♟︎ . . ; * https://www.asciiart.eu/sports-and-outdoors/chess
5 . . . . . . . . ;
4 . . . . ♙ . . . ;
3 . . . . . . . . ; +- Chess symbols in Unicode :
2 ♙ ♙ ♙ ♙ . ♙ ♙ ♙ ; * https://en.wikipedia.org/wiki/Chess_symbols_in_Unicode
1 ♖ ♘ ♗ ♕ ♔ ♗ ♘ ♖ ;
; +- Chess board notation :
a b c d e f g h ;
; => Algebraic notation .
;
8 ♜ ♞ ♝ ♛ ♚ ♝ ♞ ♜ ; --------------------------
7 ♟︎ ♟︎ ♟︎ ♟︎ ♟︎ . ♟︎ ♟︎ ; Ressources/documentation:
6 . . . . . ♟︎ . . ; -------------------------
5 . . . . . . . . ; * https://en.wikipedia.org/wiki/Algebraic_notation_(chess)
4 . . . . ♙ . . . /*****************************************************************************************************/
3 . . . . . ♘ . . \ No newline at end of file
2 ♙ ♙ ♙ ♙ . ♙ ♙ ♙
1 ♖ ♘ ♗ ♕ ♔ ♗ . ♖
a b c d e f g h
8 ♜ ♞ ♝ ♛ ♚ ♝ ♞ ♜
7 ♟︎ ♟︎ ♟︎ ♟︎ ♟︎ . ♟︎ .
6 . . . . . ♟︎ . .
5 . . . . . . . ♟︎
4 . . . . ♙ . . .
3 . . . . . ♘ . .
2 ♙ ♙ ♙ ♙ . ♙ ♙ ♙
1 ♖ ♘ ♗ ♕ ♔ ♗ . ♖
a b c d e f g h
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment