Coder Social home page Coder Social logo

hiq-abheek-gulati's Introduction

HiQ-Abheek-Gulati

HiQ board game

Referred to by many names, HiQ is a board game often played with marbles(referred to as ‘pegs’) wherein the game consists of a board full of pegs barring one initially empty hole into which other pegs may jump. In the HiQ programs, the user specifies this initial empty hole along with the maximum number of pegs that could be left on the board for it to be considered a goal state. Pegs may jump into an empty hole by jumping over other pegs. The programs read in a list of valid moves from a text file. The list of moves have the format (from, over, into). For a move to be legal at a given point, the ‘from‘ and ‘over’ holes must contain pegs while the ‘into’ hole must be empty. The program reaches a goal state once the specified number of pegs are left on the board, for example, the user may say beginning from a full board, start out with empty hole 5, and report it as a goal state only when a single peg is left on the board. When a peg jumps over a peg into the empty hole, both the ‘from’ and ‘into’ holes are left empty and only the ‘into’ hole is now occupied. This is because the peg that was jumped over must now be removed from the board. The output of the programs is a list of moves that got it to the goal state. On being presented with a solution, the user may ask for another one, as the programs are designed such that given an initial starting empty hole, they find ALL possible solutions beginning from that hole.

The code in this repository hence consist of the recursive Java, C++ and Python implementations on this game. These were written by me as part of coursework for the grad-level Computer Programming Languages course undertaken while pursuing my MS CS degree at NJIT.

hiq-abheek-gulati's People

Contributors

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