Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
chess_programming
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Radia EL HAMDOUNI
chess_programming
Commits
5b69f86c
Commit
5b69f86c
authored
Oct 28, 2020
by
Radia EL HAMDOUNI
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update README.txt
parent
0e4ae4de
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
160 additions
and
66 deletions
+160
-66
README.txt
README.txt
+160
-66
No files found.
README.txt
View file @
5b69f86c
...
...
@@ -6,6 +6,7 @@
; +- start date : October 26th , 2020. ;
; +- deadline : November 3rd , 2020. ;
; +- Goal : Program the computer to play chess. ;
; +- Licence : MIT licence. ;
;-----------------------------------------------------------------------------------------------------;
; +- description : ;
; - The user can play against the chess engine that will predict ;
...
...
@@ -14,29 +15,107 @@
; ;
/*****************************************************************************************************/
/*****************************************************************************************************\
/*****************************************************************************************************
*
\
; ;
; To compile
the file use the command :
;
; To compile
and run the program :
;
; ;
; +- Using the makefile : ;
; // compile the progam ;
; $make ;
; // run the program ;
; $./chess_engine ;
; // both compile and run the program ;
; $ make && ./chess_engine ;
; ;
; $ gcc chess_engine.c -o chess_engine ;
; - To run the executable , call the name of the file : ;
; $ chess_engine ;
; - To both compile and run the executable in the terminal : ;
; $ gcc chess_engine.c -o chess_engine && ./chess_engine ;
; ;
/*****************************************************************************************************/
/*****************************************************************************************************\
; +- 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 .
; ;
; +- Functionnlities : ;
; + 0x88 board representation with unicode encoding of the chess pieces. ;
; + FEN inmplementation in the chess game. ;
; ;
; ;
; ;
;-----------------------------------------------------------------------------------------------------;
; +- Possible improvements : ;
; - Change the board representation => Instead of using 0x88 and store the board in an ;
; array with the size 128 , we can implement the bitboard representation with a computer;
; with the architecture 64 bits and use 12 integers to store the ;
state of the chess board . ;
; - Implement a Neural Networks in the evaluation function . This will make our ;
; ELO rating higher. ;
; We can integrte NNUE to the chess engine which is the stockfish's Neural Network ;
; Or we can write our own Neural Network . ;
; - ;
; ;
; ;
; ;
; ;
/*****************************************************************************************************/
/*****************************************************************************************************/
; ;
; +- 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 ;
; ;
; ;
; ;
/*****************************************************************************************************/
/*****************************************************************************************************\
; +- 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 . ;
; + Standard Algebraic notation 'SAN' : ;
; P : pawn ;
; R : rook ;
; N : Knight ;
; B : Bishop ;
; Q : Queen ;
; K : King ;
; +- Fen Notation 'Forsyth–Edwards Notation' : ;
; ;
; A string that stores the state of the board and contains the following data ;
; example : "rnbqkbnr/pp1ppppp/8/2p5/4P3/8/PPPP1PPP/RNBQKBNR w KQkq c6 0 2" ;
; + Board State => Piece placements. ;
; + Active turn => Next color to make a move (w,b) ;
; + Castling => KQkq . ;
; + En passant . ;
; + Halfmove clock . ;
; + Fullmove number . ;
; ;
; ;
; ;
/*****************************************************************************************************/
...
...
@@ -73,66 +152,81 @@
; ;
; +- Moving a piece (how it works): ;
; first empty the square. Example ==> board[e2]=e; ;
;
;
;
;
;
;
; 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
;
;
; 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
;
;
;
;
;
; ;
; ;
/*****************************************************************************************************/
/*****************************************************************************************************/
; +-Ressources :
/*****************************************************************************************************\
;
;
; +- 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)
/*****************************************************************************************************/
/*****************************************************************************************************/
; +-Ressources : ;
; ;
; +- ASCII art : ;
; * https://www.asciiart.eu/sports-and-outdoors/chess ;
; ;
; +- Inspiration : ;
; Micro-max minimalist chess ;
; * https://home.hccnet.nl/h.g.muller/max-src2.html ;
; ;
; +- 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) ;
; ;
; +- FEN notation(Forsyth–Edwards Notation) : ;
; * https://en.wikipedia.org/wiki/Forsyth%E2%80%93Edwards_Notation ;
; ;
; +- Special chess moves : ;
; ;
; +-En passant : ;
; * https://www.youtube.com/watch?v=1q7lZilVy04 ;
; ; ;
; +- Castling : ;
; ;
/*****************************************************************************************************/
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment