Hacker News new | past | comments | ask | show | jobs | submit login

You can do it using the techniques employed here:

https://github.com/aikorea/strikersii_ai/tree/master/genetic

Demo:

https://www.youtube.com/watch?v=k6Ir8yd9iOk

In terms of FGs, you would store the relevant game state as inputs and build a reward function around health, time, damage done etc. A relatively simple (and useful!) SFII AI would be one that tries to win by only using crouching medium kick, sweep and throw.




I just meant straight up using the scripting language described in the article to hand-code an AI.


Aah in that case if you're willing to forego the limitation of using the original AI instruction scheme, you can use the technique I recently used to build a training dummy. It's just a state machine that reacts differently depending on the state of various game variables (the same idea used by the original SFII code). The scripting language is Lua, and it's basically lines of code that go:

    if (distanceBetweenChars() < THRESHOLD) then
        chooseAppropriateMove(distanceBetweenChars())
    end
etc...

Here's a demo of one that reads the distance between characters and either dashes in and does a low attack, or attempts to throw you.

https://www.youtube.com/watch?v=R9THKU63viM

It's pretty simple to have this script run for Player 1 and Player 2.

In a competitive environment (ie. when you have AI vs AI) the players involved would need to agree on certain limitations, otherwise it would be pretty simple to build an AI that reacts "instantly" to stimuli.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: