Giter Club home page Giter Club logo

peg-solitaire's Introduction

C++ Solution for Peg Solitaire

How to run

make and any c++ compiler (e.g. g++) are required.

Running with make

make run algorithm=dfs time_limit=60

Running without make

mkdir bin
g++ -Iinclude -Ofast -std=c++14 src/board.cpp src/frontierlist.cpp src/main.cpp src/move.cpp src/movefactory.cpp src/search.cpp -o bin/main
bin/main dfs 60

algorithms = [dfs, bfs, idp, random-dfs, heuristic-dfs]
time_limits = Any number between 1 to 255 (in minutes)

Macros

These macros could be found on the first line of the makefile.

MEMORY_LIMIT

This defines the memory limit for the program that if memory usage exceeds this limit, program will be terminated. (in GB) (default is 8)

SOLUTION_ANIMATION_SPEED

This defines the speed of the animation when the solution is found. (in ms) (default is 500)


Important Notes

  • This program is intended to be compiled in Linux and it is not compatible with Windows.
  • After changing value of any macro from Makefile, make sure to clear binary and object files (make clean), before using make run.

peg-solitaire's People

Contributors

rasimsadikoglu 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.