GithubHelp home page GithubHelp logo

emesterhazy / polygolf Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thenamangoyal/polygolf

0.0 1.0 0.0 574 KB

Project 4 Polygolf - COMS 4444 Fall 2021 Programming and Problem Solving

Home Page: http://www.cs.columbia.edu/~kar/4444f21/node21.html

Python 99.12% CSS 0.88%

polygolf's Introduction

polygolf

Project 4 Polygolf - COMS 4444 Fall 2021 Programming and Problem Solving

http://www.cs.columbia.edu/~kar/4444f21/node21.html

Installation

Requires python3.6 or higher

Install simulator packages only

pip install -r requirements.txt

Install map generation packages. Note the --user option to avoid conflicts with system packages

pip install -r requirements_map.txt --user

Usage

Simulator

python main.py

Map Generation

Generating map and saving to <map_path>.json file

python gen_map.py -f <map_path>.json

Optional Flags

Map Generation

You can also specify the optional parameters below to change width, height and file path.

usage: gen_map.py [-h] [--file FILE] [--width WIDTH] [--height HEIGHT]

optional arguments:
  -h, --help            show this help message and exit
  --file FILE, -f FILE  Path to export generated map
  --width WIDTH         Width
  --height HEIGHT       Height

Simulator

You can also specify the optional parameters below to disable GUI, disable browser launching, change port and address of server.

usage: main.py [-h] [--map MAP] [--automatic] [--seed SEED] [--port PORT]
               [--address ADDRESS] [--no_browser] [--no_gui]
               [--log_path LOG_PATH] [--disable_timeout] [--disable_logging]
               [--players PLAYERS [PLAYERS ...]]

optional arguments:
  -h, --help            show this help message and exit
  --map MAP, -m MAP     Path to map json file
  --automatic           Start playing automatically in GUI mode
  --seed SEED, -s SEED  Seed used by random number generator, specify 0 to use
                        no seed and have different random behavior on each
                        launch
  --port PORT           Port to start, specify -1 to auto-assign
  --address ADDRESS, -a ADDRESS
                        Address
  --no_browser, -nb     Disable browser launching in GUI mode
  --no_gui, -ng         Disable GUI
  --log_path LOG_PATH   Directory path to dump log files, filepath if
                        disable_logging is false
  --disable_timeout, -time
                        Disable Timeout in non GUI mode
  --disable_logging     Disable Logging, log_path becomes path to file
  --players PLAYERS [PLAYERS ...], -p PLAYERS [PLAYERS ...]
                        List of players space separated

Debugging

The code generates a log/debug.log (detailed), log/results.log (minimal) and log\<player_name>.log (logs from player) on every execution, detailing all the turns and steps in the game.

polygolf's People

Contributors

dafnep avatar emesterhazy avatar ichauster avatar ja3537 avatar janggg avatar jedster99 avatar joanwu5 avatar jueerecho avatar junyoungkim22 avatar keremguventurk3123 avatar luvenahuo avatar mchiquier avatar mikee478 avatar mns2162 avatar mwinitch avatar owlpudding avatar raabsm avatar samrmayers avatar silviavlachou avatar thenamangoyal avatar thomasbai98 avatar tsinghuix avatar urveeausekar avatar vaibhavbagri avatar zc22 avatar zerolfx avatar

Watchers

 avatar

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.