-
Notifications
You must be signed in to change notification settings - Fork 0
home
- How to use https://github.com/FppEpitech/MyTorch/wiki/How-to-use
- Configuration guide https://github.com/FppEpitech/MyTorch/wiki/Neural-Network-Configuration-Guide
My_Torch is a strategy-based machine-learning project inspired by the world of chess. It provides tools to generate neural networks and analyze chessboard states, paving the way for strategic supremacy. This project eschews external machine learning libraries (e.g., PyTorch, TensorFlow) in favor of custom implementations, emphasizing controlled training and robust prediction capabilities.
-
Neural Network Generator Create customizable neural networks from configuration files for tailored strategies.
-
Chessboard Analyzer Analyze chessboard states using the Forsyth–Edwards Notation (FEN) in:
- Training mode: Train networks with supervised learning.
- Prediction mode: Classify board states into "Checkmate", "Check", "Stalemate", or "Nothing".
Start by cloning the repository to your local machine:
git clone https://github.com/username/my_torch.git
cd my_torch
Use the provided Makefile
to build the binaries:
make
This will generate the binaries:
my_torch_generator
my_torch_analyzer
See how to use them in the Usage section.
Command format:
./my_torch_generator config_file_1 nb_1 [config_file_2 nb_2...]
-
Parameters:
-
config_file_i
: File specifying the neural network configuration. -
nb_i
: Number of neural networks to generate.
-
-
Example:
./my_torch_generator basic_network.conf 3
Outputs:
basic_network_1.nn
,basic_network_2.nn
,basic_network_3.nn
.
Command format:
./my_torch_analyzer [--predict | --train [--save SAVEFILE]] LOADFILE FILE
-
Parameters:
-
--train
: Trains the network using FEN inputs and expected outputs. -
--predict
: Predicts states for chessboards in the input file. -
--save
: (Optional) Specifies a file to save the trained network.
-
-
Example:
./my_torch_analyzer --predict my_torch_network.nn chessboards.txt
The project includes a Makefile with the following rules:
-
make
: Builds the project. -
make clean
: Removes object files. -
make fclean
: Removes binaries and temporary files. -
make re
: Cleans and rebuilds the project.