Mythruna AI, semi-funny story

This post was written for slightly less-technical folks but still might be an interesting read for anyone who has ever played with GOAP or STRIPS style action planning for an AI.



The preborn AI is already hacking my game...



It somewhat reminds me of some of the bizarre questions we would get out of backwards chaining expert systems “back in the day”.

4 Likes

Nice morning read.

Always interesting your ‘papers’

@zzuegg said:
Nice morning read.
Always interesting your 'papers'


Thanks. Glad to know someone is reading them. :)

Really nice read.



Is it possible to create a extract generic AI system for jME from Mythruna…like the thing you described, it’s general for most of the games.

@iamcreasy said:
Really nice read.

Is it possible to create a extract generic AI system for jME from Mythruna...like the thing you described, it's general for most of the games.


I'm going to try. Other JME devs have also done some general GOAP style libs. Maybe in the far-flung future there is a MonkeyBrains plugin or something. ;)

I'm trying to keep mine general but in the end my priority is still a working game. Integrating the AI with my entity system (next on my list) may require some compromises but we'll see. I'm currently developing the AI as a separate project to limit Mythruna-specific dependencies. I will tell you mine has a dependency on Google Guava (http://code.google.com/p/guava-libraries/) and Filament's fstep library (http://filament.sourceforge.net/)... this adds about 1.8 meg in jars right off the bat. But Guava is just a great set of classes to have around, anyway.
1 Like

The more I read your stuff and the way you do your stuff simply amazes me. Surely you had a long way before starting this project.



I always wonder what should be the path the everyone must follow. So, people doesn’t have to look back and rewind the tape and do something else after he started his project.

@iamcreasy said:
The more I read your stuff and the way you do your stuff simply amazes me. Surely you had a long way before starting this project.

I always wonder what should be the path the everyone must follow. So, people doesn't have to look back and rewind the tape and do something else after he started his project.


I've been programming software professionally for more than 20 years... and been writing code for nearly 30.

The reason I got into computers in the first place was to write games. That was back in the day where one or two people could write a best selling game and just do all the parts themselves. Even the shareware games were excellent and had small teams. Doom was made by a small handful of guys and that wasn't even id's first game. The idea that games like The Faery Tale Adventure (http://en.wikipedia.org/wiki/The_Faery_Tale_Adventure) could basically be written by one guy doing the music, graphics, etc. was really appealing to me.

Over the years, I watched the industry change so much that developers turned into nothing more than cogs in a giant machine. Still, I always had an interest and kept up with my music and graphics as best I could over the years. In the mean time, I bent my artistic eye and graphics experience to data visualization. This let me play with cool hardware and stay half up-to-date on things like OpenGL and shaders.

But the best part of working in the data visualization industry is that most of the customers required rapid turn-around on some new idea and 9 times out of 10, things that start as prototypes need a quick path into production. I was also able to say abreast of changes in data models and architectures for dealing with them... even contributing some of my own open source stuff along the way (http://meta-jb.org/ http://fgraph.org/) Data visualization also let me play with whole-earth databases (like Google Earth) in my own custom GIS renderers and stuff. Good times.

In the mean time, I also participated in modding communities like Neverwinter Nights which let me learn well the non-technology side of making a game work... all of the content. I even had some utility code I made available to that community. (http://nwntools.sourceforge.net/)

I've kept a close eye in the indie developer scene the last few years and it's been exciting to see what small teams can produce again. Even better, there is a nice interaction with the community right from the beginning. I just had to find an idea that I could run with.

But, yeah, the fact that I've been designing RPGs in my head since I was 12 and the fact that I've had a ton of experience developing software in spiral/iterative models means that I could pretty easily hit the ground running.

There is a book and body of research that purports that to get really truly good at anything takes about 10,000 hours of experience. (http://en.wikipedia.org/wiki/Outliers_%28book%29) You definitely won't get 10,000 hours worth of "product" out of that time but you will gain the experience necessary to do great things.

If a "one path" can be generalized for everyone then that path is just to "write lots of stuff" without much concern for where it goes. If it's something you like but isn't quite right... tear it down and rewrite it better. Repeat as needed. Eventually it all clicks. The only sure way to failure is to do nothing at all.
4 Likes

^ nice read :slight_smile: you’ve done some awesome stuff

Inspiring!



For a mid scale project, between,

  1. Jumping back and making that old things better or,
  2. doing completely new thing from the scratch,

    which one is preferable?
1 Like
@iamcreasy said:
For a mid scale project, between,
1. Jumping back and making that old things better or,
2. doing completely new thing from the scratch,
which one is preferable?

Only you will know. If you have a completely different idea on how you want to assemble it, do it from scratch. You'll probably still be able to copy-paste or look up how things were done in your old code. If you feel its just a vast change thats needed then thats the perfect occasion to learn more about refactoring tools of the SDK/IDE and doing such changes in general :)
1 Like
@iamcreasy said:
Inspiring!

For a mid scale project, between,
1. Jumping back and making that old things better or,
2. doing completely new thing from the scratch,
which one is preferable?


As Normen says, it's mostly up to you. I would add: do which ever one you thing you are more inspired to work on.

If you end up some day with the problem that you never finish a project... that's a different problem. But it also probably means that you've started a million projects by then and that each one taught you something different. Much like old-school platformer games, you get so good at the early stages that you could do them with your eyes closed.
1 Like
@pspeed said:
As Normen says, it's mostly up to you. I would add: do which ever one you thing you are more inspired to work on.

If you end up some day with the problem that you never finish a project... that's a different problem. But it also probably means that you've started a million projects by then and that each one taught you something different. Much like old-school platformer games, you get so good at the early stages that you could do them with your eyes closed.


Excellent answer. Thank you.

My main issue is with scaling and how to spread out the code base into smaller independent chunks. But, I'll post them in another thread.
1 Like

Hi
Sorry for bumping this up… @pspeed

Nice reading,

Curious if you have come up with a GOAP api or any code base which is integrated nicely with Zay-ES , and you are willing to share it ? :slightly_smiling_face:

Nah, I am working on different kinds of agent AI and I hope to open source something related to it. Think the kind of AI that could manage the mobs in Rimworld or Dwarf Fortress… that sort of thing.

GOAP has some limitations in how state can be chained… especially when you have potentially very large state spaces. It’s ok for very short chains and when you can limit the state explosion. For example, “load gun, need bullets”… kind of easy if you don’t care about which bullets. Things get tricky if you want to know whether you should unlock the red door before the blue door or bash through a third door to get the keys for the other doors. The state explosion necessary to track the world down each different branch to figure out the “best way” expands exponentially.

Even in my simulation of an arm moving blocks around, the state space gets quite large as you search for least-cost solutions.

1 Like

Nice, looking forward to hear more about it.
If it is not GOAP, may I ask If you are following any generic ai pattern, which is flexible than GOAP ? And in case can you link me to any docs or tutorials for it.

Thanks

So far nothing specific as I’m more dealing with the scheduling and task chaining aspects. It closely resembles behavior trees but is not formalized in that way.

It’s actually kind of hard to say and may end up as something that I publish and then someone else tells me what it’s called. I’ve read so many AI books/web pages at this point that a lot of it bleeds together. (Is an adaptive FSM really that much different than a flattened behavior tree ?)

The focus is on tasks and task assignment by a centralized mediator… prioritization, etc… At least so far. Every couple iterations it changes a bit.

1 Like

Really I am getting interested in it,
Previously I attempted to integrate gdx-ai behaviour tree as is with es design but because gdx-ai BT is OOP in it’s core I could not do a clean job.

I am looking forward to task system you are working on. :slightly_smiling_face:

Yeah, but the AI and an ES have almost no direct integration points. The AI will need to know about the world and so interface with the ES… but that’s about it.

Anyone trying to keep deep AI state in the ES is already on weak footing.

1 Like