Giter Site home page Giter Site logo

williamaredal / catan-simulator Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 901 KB

Every Catan player's playground for simulating N games and looking at the simulation's stats and strategy to prepare for your next Catan game. The simulations explore possible strategies by random choices, sheer numbers and sorting functions to reveal strategies hard to think of on your own.

License: MIT License

HTML 5.49% JavaScript 50.52% CSS 6.04% Python 37.80% Shell 0.15%
catan catan-board-game catan-simulations strategies stats modelling game game-theory game-theory-model

catan-simulator's Introduction

Catan-Simulator

Running Catan Simulator

1. Make sure you have the latest versions of Node and Python installed, and clone this repository.

Links for Node and Python if you don't already have them installed: https://nodejs.org/en/download/ https://www.python.org/downloads/

2. Start venv from /src/api/ and install packages

Run venv\scripts\activate followed by py -m pip install -r requirements.txt to install the required python packages.

Install the required node modules by running npm i

3. Start the website

You will need two terminals to run the website, one for the frontend, and one for the backend (with venv activated). To start the frontend run npm start To start the backend run npm run start-api

Using the website

The website requires you specify the number of Catan simulations to run, which loads until they're displayed. The N limit is currently set to 100 000 000 as it takes a while to run all 100 million simulations, and probably doesn't end up adding more. Except time waiting.:watch: To find out more about any of the simulations simply click on it's row to view all of the simulation's relevant information and stats. Information and stats available for viewing are: victoryPoints, cardsToVictory, spentResources, villages, cities, roads, devCards, decisionTree, longestRoad and largestArmy. Most are self-explanatory, while others aren't.

cardsToVictory refers to the number of resource cards spent to achieve victory in the simulation.
spentResources refers to the number and types of resources spent during the simulation.
devCards represents all development cards bought during the simulation.
decisionTree is the linear history of choices logged.

The virtualized table also supports column sorting in ascending and descending order. So you can run a large set of simulations and sort them to find strategies that focusing on or ignore certain aspects of Catan. The column 'cardsToVictory' can also be sorted to find different strategies requiring the most cards to win, for those interested in loosing in the funniest way, or the strategies requiring the fewest number of cards to win.

Perhaps you will find something to surprise your friends the next time you play a game of Catan. Or mabye just a conversation topic about ๐Ÿฑ ๐Ÿ…ฐ๏ธ N

catan-simulator's People

Contributors

williamaredal avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

wizardevhub

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.