Coder Social home page Coder Social logo

smashbot_analysis's Introduction

SmashBot Analysis

An AI-powered advantage bar for Melee.

Mockup of SmashBot Analysis (Image Mockup)

What Does the Analysis Mean?

The analysis is SmashBot's best prediction on who will win either the game, given the current game state.

BETA

The SmashBot analysis isn't quite ready to be used by tournaments just yet. It works, but needs needs some more programming to be ready for the spotlight.

What Information Does the Analysis Consider?

The SmashBot analysis looks at the current game state as a snapshot in time. So it does not see things like:

  • Results of previous matches
  • Momentum, or who is currently "on a comeback"

Specifically, the analysis is fed:

  • Both player's characters
  • Both player's damage
  • Both player's x,y coordinates
  • Both player's stock count
  • Both player's action state
  • Current stage

How does the SmashBot Analysis Work?

It uses a neural network (TensorFlow) trained on a mountain of SLP files.

Training works in a two phase process.

  1. Building the dataset
  2. Training the model

Building the Dataset

Building the dataset involves taking a mountain of SLP files and extracting key information from them. This means the information above (character x,y coords, etc...) but also the results of the match so the machine can learn from it.

This can be executed by placing your SLP files inside a folder named training_data/ and then running:

./advantage_bar.py --build

This will iterate through each of the SLP files using libmelee and extract the important information into .tfrecord files, placed inside tfrecords/.

When this completes, you should have a tfrecords/ folder filled with *.tfrecord files. Roughly one-per SLP file.

Training the Model

After having build the tfrecord dataset above, you can begin training.

./advantage_bar.py --train

When finished, the model will be saved to disk in savedmodel/

Running a Proof-of-Concept

Once you've trained your model (or gotten a pre-trained one) you can start running predictions.

./visualization.py

Dolphin will boot up automatically. Load up a browser and point it at:

http://127.0.0.1:8888/static/index.html

Animated Example

smashbot_analysis's People

Contributors

altf4 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

smashbot_analysis's Issues

Add data augmentation

  • Swap the player and labels. The analysis should work equally well if the players are swapped.
  • Randomly move the player positioning slightly.
  • Randomly change damage slightly

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.