3 ms·
I just meant straight up using the scripting language described in the article to hand-code an AI.
by coldpie 10y ago
I just meant straight up using the scripting language described in the article to hand-code an AI.
- ilitirit 10y agoAah 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 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.