Giter VIP home page Giter VIP logo

mario's Introduction

A goofy code of grid of Mario finding the Princess in a grid with blocks

To be done

  • Using A*
  • Using a reinforcement learning agent

To use the code you can install the following:

pip install flask_sqlalchemy
pip install flask_marshmallow
pip install marshmallow-sqlalchemy

Or install the requirements file using the below command from the terminal

pip install -r requirements.txt

mario.py expects two inputs, N which is the grid_size and the grid itself containing the princess location as -> ['--m','x-x','--p'] to run mario.py directly, use the below example

python mario.py 3 ['--m','x-x','--p']

To try the endpoints in the flask application, use the tools for API development such as postman Run the below command from your terminal python database_util.py After this, insert the address in postman http://127.0.0.1:5000/mario To play the game, send a POST request as the below example

{
    "grid_size" : "3",
    "game_grid" : "['--m','x-x','--p']"
}

The data saved will include the expected outputs shortest_path and error_flag, and also save the inputs as well as the time of the request as below

{
    "error_flag": false,
    "game_grid": "['--m','x-x','--p']",
    "grid_size": 3,
    "log_time": "Thu Mar 28 02:28:24 2019",
    "shortest_path": "[['LEFT', 'DOWN', 'DOWN', 'RIGHT']]"
}

You can also retreive all saved tables data by sending a get request

mario's People

Contributors

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