Qhimm.com Forums

Miscellaneous Forums => General Discussion => Topic started by: Bosola on 2014-09-07 00:43:43

Title: SEPHIROTH - a proposal for a simple AI script builder
Post by: Bosola on 2014-09-07 00:43:43
We've had Hojo. We've seen Heidegger, later Proud Clod. White Choco and Black Choco have been claimed. Meteror, Palmer, and Ochu have been used as editor names too. There's one big name missing, and I'd like to fill that gap. That name is Sephiroth. And rather appropriately for someone who manipulates people, I think he'd be suited to an AI editor of some kind.

My proposal is a GUI AI script builder broadly based around the AI templating snippets I wrote way back when, taking a similar concept to FFXII's gambits. You build a script by creating a 'decision flow', essentially a list of 'possibilities'. Each possibility has a condition and an associated action. We build an AI script by giving each type of possibility a template, which can produce 'meta script' with symbolic addresses which we can fill in fairly easily in a single pass, as the templates each have a fixed length. Each template leaves two values on the stack - a target and an action ID - and each script ends by executing those items and calling the standard script exit function.

I've got a pretty decent idea how I'd implement this. I'd probably use web technologies as I did with the FFVII calculator, meaning a JavaScript application that can be packaged as something desktop-shaped if needs be.

I managed to get a basic UI up and going just now using a few of the frameworks I expected to use. That's the easy part, but perhaps it shows exactly how something like this might fit together:

(http://i.imgur.com/poLWdao.png)

What do people think? If it's something people are really keen on I reckon I could get something up in maybe a couple of weeks.
Title: Re: SEPHIROTH - a proposal for a simple AI script builder
Post by: Vgr on 2014-09-07 00:55:48
Looks really great! I'd totally support that.
Title: Re: SEPHIROTH - a proposal for a simple AI script builder
Post by: nfitc1 on 2014-09-07 01:23:01
I'm all for this idea. I liked the idea of your blocks "way back when", but if you make this online, can you make a way for other users to build their own conditions for others to use? There's lots we don't know still and undoubtedly things that one person won't consider.
Title: Re: SEPHIROTH - a proposal for a simple AI script builder
Post by: meesbaker on 2014-09-07 01:26:25
This is truly great! So far creating “new“ bosses on psx for me was limited to copying an AI and replacing the attacks and making minor edits to the AI. But creating an intelligent and customized behavior from scratch easily is something I would really love to see.
Title: Re: SEPHIROTH - a proposal for a simple AI script builder
Post by: Sega Chief on 2014-09-07 03:05:07
Sounds like it'd be a handy time-saver, but a key thing will be how much control the user has over the conditions. If they can mix and match them together then it'll be fine, otherwise it'll be quite restricting (for instance, if I was making this example script with the proposed tool would I be able to tack on Random MOD or a Reflect check to the Cure condition block? Or do I need to use a pre-made block?)
Title: Re: SEPHIROTH - a proposal for a simple AI script builder
Post by: Bosola on 2014-09-07 10:54:57
I'm all for this idea. I liked the idea of your blocks "way back when", but if you make this online, can you make a way for other users to build their own conditions for others to use? There's lots we don't know still and undoubtedly things that one person won't consider.

I intend to GPL any tool(s) I create, and I can't see why I wouldn't put templates in their own module for extensibility's sake. If I have the time I'd quite like to write some template unit tests that can check whether a template creates well-formed scripts, whether it leaves the stack in the right state, etc. A simple state machine should be enough - perhaps as a separate project that others can use standalone. With unit tests, adding new templates should be a lot simpler; anyone who runs a new template against them should just be able to make a pull request (or add it to their fork). Testing that AI scripts don't crash the battle engine is quite time consuming, so unit tests are really important.

Sounds like it'd be a handy time-saver, but a key thing will be how much control the user has over the conditions. If they can mix and match them together then it'll be fine, otherwise it'll be quite restricting (for instance, if I was making this example script with the proposed tool would I be able to tack on Random MOD or a Reflect check to the Cure condition block? Or do I need to use a pre-made block?)

I see templates as being relatively restrictive in control flow but quite liberal in variable use. They'll need to translate fairly easily into script blocks. But there needn't be any limit on the number of templates, and obviously they should be abstracted such that you could specify which variables to check. As I see it, though, no GUI tool is going to be able to match the absolute flexibility of a real script, and I don't have the time or the skill to write a compiled language for FFVII scripts, so this should aim to be a half-way house providing simple scripts that cater to the most common use-cases.
Title: Re: SEPHIROTH - a proposal for a simple AI script builder
Post by: Tenko Kuugen on 2014-09-07 16:11:07
I'd definitely have a lot of use for something like this.
A. lot.
Title: Re: SEPHIROTH - a proposal for a simple AI script builder
Post by: myst6re on 2014-09-07 16:48:31
Aah, an interesting project!