Giter VIP home page Giter VIP logo

mm28-hackathon's Introduction

Python-Starterpack

Thank you for coming out to MechMania 28!

This repository contains source code of the Python Starterpack for MechMania 28. You may view or edit any file in this repository.

Make sure you have read Wiki for information on the game mechanisms.

Get Started

Your job is to create a strategy for your bot on where, how and who it should fight.

To get started, create a class under the strategy package and implement the functions provided by the strategy interface. We will also provide an example strategy named starter_strategy that will do nothing but being an example.

For each phase in the game, you will be given a GameState and your playerIndex as input, and you need to submit a decision by returning a value to the corresponding .._action_decision methods. After you have done writing down your logic, register your strategy by editing the return values in strategy_config.py. You could create different strategy implementations and register them for different players.

You'll primarily need to look at the classes within the game package to know what are the objects that assembles into in a GameState that you will receive from the engine.

We have provided some useful stuff in the util package. utility includes some mathematical and random functions. Also, we recommend using logging.info("your_message") to debug. It does the same job as System.out.println while keeping the output tidy, and prints out more information.

Finally, compile your bot by using py build.py and you will find the executable bot.pyz under the project root file. Use commands

py path/to/pyz <player_number> or the ./start-4-python-bots.bat (this is a development byproduct so sorry mac users) to run 4 copies of your bot

alongside Engine to test them out, and use mm push (TODO) to submit to the tournament!

Again, make sure you are familiar with the mechanisms of the game and the Strategy class. If you have any questions, do not hesitate to contact us through Discord or in person with any questions!

Good luck!

Note

You can enable debug output with option -d, which will make the bot print out every message it sends to the engine.

mm28-hackathon's People

Contributors

mystri avatar hanboyou avatar

Watchers

Ethan Greenwald 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.