Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

CS498 Final Project: Catan Build Order Optimization (MILP)

Overview

This project models a single player version of Catan as a mixed integer linear program (MILP) in Python with Gurobi.

Main goal:

  • minimize the first turn where target victory points (VP) are reached

I compare MILP results against:

  • a Greedy legal action baseline
  • a Random legal action baseline

Project Structure

  • Final_Project.py
    • single run MILP solve (proof/bound focused run on one board seed)
  • Final_Project_iterative.py
    • iterative horizon MILP batch across seeds (120–129), writes CSV/JSON summaries
  • GreedyEvauluator.py
    • greedy baseline batch over seeds (120–129)
  • RandomAction.py
    • random legal action baseline, 10 runs per seed over seeds (120–129)
  • results/
    • generated CSV/JSON outputs used for analysis
  • figures/
    • generated plots used in report
  • CS_498_Final_Project.pdf
    • final report

Requirements

  • Python 3.12 (or close equivalent)
  • gurobipy (academic/non commercial license used in this project)
  • matplotlib (for figure generation scripts)

How to Run

From inside Final_Project/:

1) Single run MILP (one seed/config)

python Final_Project.py

2) Iterative MILP batch (seeds 120–129)

python Final_Project_iterative.py

3) Greedy baseline batch

python GreedyEvauluator.py

4) Random baseline batch (10 runs/seed)

python RandomAction.py

Main Output Files

  • results/iterative_seed_120_129_summary.csv
  • results/iterative_seed_120_129_horizon_rows.csv
  • results/iterative_seed_120_129_meta.json
  • results/greedy_seed_120_129.csv
  • results/greedy_seed_120_129_meta.json
  • results/random_action_seed_120_129_runs10.csv
  • results/random_action_seed_120_129_runs10_summary.csv
  • results/random_action_seed_120_129_runs10_meta.json

Modeling Notes / Scope

This is a simplified single player Catan model:

  • no opponents
  • no robber interactions
  • no ports
  • deterministic expected value production (not stochastic dice simulation)
  • dev cards simplified to knights (Largest Army logic included)

Reproducibility

  • Board seeds are explicitly fixed in code and metadata outputs.
  • Batch comparisons use seeds 120–129.
  • Seed 498 is used for proof depth case study runs in the report.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages