Skip to content

explores the use of supervised machine learning techniques to analyze and predict strategic decisions inspired by Napoleonic warfare. Drawing from historical battle data, troop movements, and decision-making patterns, the project aims to develop models capable of recommending optimal strategies for simulated battle scenarios.

License

Notifications You must be signed in to change notification settings

garethcmurphy/OpenBattlePredictorAI

Repository files navigation

Supervised Learning for Napoleonic Strategy

This project applies supervised learning techniques to predict the outcomes of Napoleonic battles based on historical data.

Project Structure

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/supervised-learning.git
    cd supervised-learning
  2. Install dependencies using Poetry:

    poetry install

Usage

  1. Run the prediction script:

    poetry run python src/battle_predict.py
  2. Output: The script will print the accuracy and classification report of the model.

Data

The dataset battles.csv contains historical data of Napoleonic battles with the following columns:

  • Battle Name
  • Date
  • Commander
  • Troop Strength
  • Opponent Commander
  • Opponent Strength
  • Terrain
  • Weather
  • Strategy Used
  • Outcome

Model

The model uses a Random Forest Classifier to predict the outcome of battles. The features used for prediction include:

  • Troop Strength
  • Opponent Strength
  • Terrain
  • Weather
  • Troop Ratio (derived feature)

License

This project is licensed under the MIT License. See the LICENSE file for details.

Author

Gareth Murphy - [email protected]

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

Acknowledgements

About

explores the use of supervised machine learning techniques to analyze and predict strategic decisions inspired by Napoleonic warfare. Drawing from historical battle data, troop movements, and decision-making patterns, the project aims to develop models capable of recommending optimal strategies for simulated battle scenarios.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages