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
d5b98bfa
Commit
d5b98bfa
authored
Oct 27, 2020
by
Radia EL HAMDOUNI
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update README.txt
parent
805775ce
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
109 additions
and
114 deletions
+109
-114
README.txt
README.txt
+109
-114
No files found.
README.txt
View file @
d5b98bfa
# 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.
+- deadline : November 3rd , 2020.
+- Goal : Program the computer to play chess.
+- description :
- The user can play against the chess engine that will predict the best moves to win the game.
+- 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)
/*****************************************************************************************************\
; ;
; +- author : Radia EL HAMDOUNI . ;
; +- start date : October 26th , 2020. ;
; +- deadline : November 3rd , 2020. ;
; +- Goal : Program the computer to play chess. ;
;-----------------------------------------------------------------------------------------------------;
; +- description : ;
; - The user can play against the chess engine that will predict ;
; the best moves to win the game. ;
; - The chess engine can also play itself for debug and test purposes . ;
; ;
/*****************************************************************************************************/
-----------------------------------------------------------------------------------------------------------
/******************************************************************************************************\
/*****************************************************************************************************\
; ;
; To compile the file use the command : ;
; ;
...
...
@@ -51,83 +24,105 @@ This is a project that is part of the MLOD UV.
; $ chess_engine ;
; - To both compile and run the executable in the terminal : ;
; $ 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; ;
; 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
8 ♜ ♞ ♝ ♛ ♚ ♝ ♞ ♜
7 ♟︎ ♟︎ ♟︎ ♟︎ ♟︎ . ♟︎ ♟︎
6 . . . . . ♟︎ . .
5 . . . . . . . .
4 . . . . ♙ . . .
3 . . . . . . . .
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
8 ♜ ♞ ♝ ♛ ♚ ♝ ♞ ♜
7 ♟︎ ♟︎ ♟︎ ♟︎ ♟︎ . ♟︎ .
6 . . . . . ♟︎ . .
5 . . . . . . . ♟︎
4 . . . . ♙ . . .
3 . . . . . ♘ . .
2 ♙ ♙ ♙ ♙ . ♙ ♙ ♙
1 ♖ ♘ ♗ ♕ ♔ ♗ . ♖
a b c d e f g h
\ No newline at end of file
/*****************************************************************************************************/
; +-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)
/*****************************************************************************************************/
\ No newline at end of file
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