Skip to content

Undergraduate research project developing a neural network to play the game Freeciv.

Notifications You must be signed in to change notification settings

BjornMelin/freeciv-research

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FreeCiv AI Research Hub 🏛️

Python PyTorch FreeCiv License

AI research and implementation for FreeCiv game analysis and strategy development. Features neural network-based game AI, turn analysis, and strategic decision-making systems.

📑 Table of Contents

✨ Features

  • Neural network-based game AI
  • Automated turn data generation
  • Strategic decision-making systems
  • Integration with FreeCiv game data
  • Performance benchmarking

📁 Project Structure

graph TD
    A[freeciv-ai-research] --> B[src]
    A --> C[data]
    A --> D[docs]
    A --> E[models]
    B --> F[neural_network]
    B --> G[scripts]
    C --> H[raw]
    C --> I[processed]
    E --> J[trained]
Loading
Click to expand full directory structure
freeciv-ai-research/
├── src/               # Source code
│   ├── neural_network/ # Neural network implementations
│   │   └── neural-network.py
│   ├── scripts/       # Data processing scripts
│   │   ├── create-data.py
│   │   └── create-score.py
│   └── test-data-generator.py
├── data/             # Data files
│   ├── raw/           # Raw data
│   │   └── TurnData.txt
│   ├── processed/     # Processed data
│   └── results/      # Analysis results
├── docs/             # Documentation
│   ├── client-server-options.md
│   ├── traits.md
│   ├── useful-functions.md
│   └── UsefulFunctionNotes.txt
├── models/           # Trained models
│   └── trained/      # Trained model files
├── README.md         # Documentation
└── LICENSE          # License file

🔧 Prerequisites

  • Python 3.8+
  • PyTorch 2.2+
  • NumPy
  • Pandas
  • FreeCiv 2.6+

📦 Installation

# Clone repository
git clone https://github.com/BjornMelin/freeciv-ai-research.git
cd freeciv-ai-research

# Create environment
python -m venv venv
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

🚀 Quick Start

from src.neural_network.neural_network import GameAIModel
from src.test_data_generator import generate_data

# Initialize model
model = GameAIModel(input_size=256, hidden_size=512, output_size=256)

# Generate and process turn data
turn_data = generate_data("data/raw/TurnData.txt")

📚 Documentation

Neural Network Architecture

  • Implementation details of the neural network models
  • Architecture diagrams
  • Training procedures

Data Generation

  • How to generate training data from FreeCiv games
  • Data preprocessing pipeline
  • Data format specifications

FreeCiv Integration

  • How to integrate the AI with FreeCiv
  • Data collection from game turns
  • Strategic decision-making implementation

🤝 Contributing

📌 Versioning

We use SemVer for versioning. For available versions, see the tags on this repository.

✍️ Authors

Bjorn Melin

📝 Citation

@misc{melin2024freecivairesearch,
  author = {Melin, Bjorn},
  title = {FreeCiv AI Research Hub: Game AI Systems},
  year = {2024},
  publisher = {GitHub},
  url = {https://github.com/BjornMelin/freeciv-ai-research}
}

📄 License

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

🙏 Acknowledgments

  • FreeCiv developers
  • PyTorch community
  • NumPy and Pandas developers

Made with 📚 and ❤️ by Bjorn Melin

About

Undergraduate research project developing a neural network to play the game Freeciv.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages