Giter Site home page Giter Site logo

carrom-agent's Introduction

carrom-agent

Deterministic algorithm to simulate a carrom agent to play carrom

I have implemented a deterministic algorithm for playing carrom. It covers the complete board in 24 turns when averaged over 500 different random seeds.

Command for running the code:

python start_experiment.py -ne 500 for running over 500 different random seeds.

python start_experiment.py for random seed=0

python start_experiment.py -v 1 to visualise the carrom board

This has been done as a part of CS 747 course project.

The implementation of the board has been used from:

https://github.com/samiranrl/Carrom_rl

Algorithm:

It predicts the action to be taken given a state of the board. It checks for direct shots into pockets, then the cut shots, rebounds and the double shots (direct hit the coin so that the wall reflects it into the pocket) The algorithm uses theory of collisions to make correct moves.

The action consists of:

Position of the striker (normalized to be between 0 to 1)

Angle of strike ( constrained to be between -45 to 225)

Force( 0 to 1) 0 force covers almost one third the width of the board, force=1 covers 3.5 times the width of the board when noise is absent.

The algorithm successfully clears the board in 24 moves when averaged over 500 games.

carrom-agent's People

Contributors

mehtanihar avatar

Watchers

James Cloos avatar  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.