Git Product home page Git Product logo

botroyale's People

Contributors

arielhorwitz avatar imcrazeegamer avatar moralsiani avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

botroyale's Issues

Bots need to get information about the game state

When a bot is called to action, it should receive some sort of game state data. Currently there are only random bots that don't require any knowledge of the game state.

It is probably preferable that the bots receive some copy and not direct access to the game data (numpy arrays in particular).

BaseBotAPI

Thinking about it, perhaps the Logic maintainer @MoralSiani can make a BaseBotAPI class similar to BaseLogicAPI. That way they can more easily add new features available to the bots without requiring simultaneous updates in both logic and bots packages?

New mechanics (actions or map features)

As we stabilize the core of the codebase, we can begin to think of adding new in-game mechanics: new actions, or new map features (to add to walls, pits, and the ring of death).

This would be a change in logic.state.State and api.actions.

missing Hex type check

Need Hex type check,
Unable to identify bot tile type for actions, can't convert Hex to Hex or check type instance for Hex.
either is_hex() function or allow Hex init with hex object.

Choose python version

We should choose a version of python that is officially supported/required by the project. I suggest python 3.10. If we can get a consensus here that should be enough.

Missing visual effects

Missing visual indication for actions (move and push). Should be accessible to the logic via the logic-to-gui event queue.

standardize grid

Need to standardize grid, preferably (rows, columns) and (0,0) on top left.
ty

2 layers of sprites on map

need an additional layer of sprites for each tile, behind player but Infront of hex,
this will allow to show items, traps and unique tiles in the gui,
they will follow the convetion of white images that allow for changing the color

Action Validation for bots

The bots have no valid way of checking if a action will work and further more they don't have any way of knowing what the result of there action would be

I'm proposing we make a check_valid_action(action: Action): -> bool and a simulate_action(action: Action): -> world_info

this will allow us to check and see outcomes of moves also will allow us to see if a move will win the game or not
(Would like the world_info to have a game_over_flag or something)

Idle Crashes battle.py

if a bot returns an idle action this is thrown

File "C:\coding\GitHub\Bot-Royale\gui\gui.py", line 88, in mainloop_hook
     self.next_turn()
   File "C:\coding\GitHub\Bot-Royale\logic\battle.py", line 96, in _check_legal_action
     raise TypeError(f'Unknown action: {action}')
 TypeError: Unknown action: <api.actions.Idle object at 0x000002A618E50DF0>

Bots too big on map

Make the bot a bit smaller, so it seems they are standing on the tile and not being the tile itself.
ty

Argparsing / make running custom scripts easier

There are currently several hurdles to trying to run a custom script in the project. In particular if a script is not in the root dir of the project, it will be difficult to access and import other parts of the project.

A folder should be made designed for custom scripts which should be recognizable from main.py, but also the contents of which should be ignored by .gitignore. This will require the user to specify the name of the custom script to run in settings or in an argument parser so that an import can be made.

Need more competitive bots

Hopefully the new docs and guides will help new bot developers, as we really need more bots that know how to play!

Replace `BaseBot.id` with `BaseBot.uid`

The word id is a builtin in python and can be confusing. I believe that agreeing to always call it uid (Unit ID) will be clearer.

Will probably need aliasing and a deprecation warning.

Bot classes undiscernible

GUI should show what bot class each unit is - by using a color for each bot class.

It's possible for the bots to determine their own color, or for the GUI to determine the color for the bots. I personally lean toward bots determining their own color - requiring a definition in BaseBot. The GUI can put some limitations on color choice to avoid confusion with other map elements in the GUI.

Catch bot.poll_action() exceptions and state.kill_unit()

The battle calls bot.poll_action() and at that point excecution is passed to the bot code. Unhandled exceptions in this execution will crash the program. I suggest we try..except the call to catch any exception and log the entire traceback.

If an exception is caught, I suggest the battle by default should use a (yet to be written) method in State State.kill_unit which will... Kill the unit.

State Serialization

A State object should be serializable; mostly for saving/loading replays from disk.

Ideally, it not only mimics State.copy but also shares with it a list of attributes that are required to recreate an identical state. This list of attributes would possibly also be used by a __hash__ method.

Bot names not shown in interface

Bots should be identified by ID and name in the GUI state string. This can be accessed with the Bot.NAME attribute.

Unit #1 -> 1. RandomBot
Unit #2 -> 2. BaseBot

API documentation

As the project begins to stabilize, it is worth reviewing and documenting (possibly also refactoring) the modules used by bot developers.

Some proper guides would also be helpful:

  • "Step by step: write a simple bot"
  • "Custom battles: how to run battles without the GUI"

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.