Mythruna
April 19, 2024, 04:46:09 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to the new forums. See "Announcements" for a note for new users.
 
   Home   Help Search Login Register  
Pages: [1] 2 3
  Print  
Author Topic: The AI is the game...  (Read 33560 times)
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« on: June 03, 2012, 02:36:38 PM »

I apologize for being so quiet lately but rest assured that I am toiling away.

Lately, much of the work I've been doing is designing the AI.  Lots and lots of notes and technical documents with only random spurts of code.  I hope to have something to show for it soon but it's one of those things that pays to get right.

As I got deeper and deeper into the design of the AI, it was becoming clearer that this is essentially the core of the game.  Everything else is mechanical window dressing in comparison and any of it could be swapped out for simpler or more complicated systems if the AI is doing its job.  I mean, it's all important but the AI is what will make this RPG and not just a sandbox full of neat tools.

Physics, seasons, weather, even the magic system are such that if my best intents don't pan out then there are still pretty cool fallback positions... they just may mean more detail work for me.  I can always fall back on standard RPG tropes of pre-scripted built in items, scripted actions instead of physics, etc..  But if the AI is nothing more than growling heat seeking missiles (not to name names), then it's not really an RPG.  At least not the kind I want to write.

So, I'm left with making sure that my goal-oriented-action-planning system (GOAP) works like I want or I fall back on standard Neverwinter Nights style event-based decision tree scripting.  GOAP still looks promising and means that it will be really easy to make some very dynamic AI... even with NPC-specific random personalities.  Either way, though, there is a ton of work left.

I'm developing the AI inside of a simple test program that presents a simplified top-down 2D world.  I can place NPCs of various types into the world and tweak their goals and settings at runtime or give them specific commands.  With luck, this will get to the point where I can let others play with it and give them a glimpse of what I've been working on.  Hopefully some version in the next week or so.

Logged
FutureB
Donators
Hero Member
***
Posts: 512


RAWR


View Profile
« Reply #1 on: June 03, 2012, 02:58:47 PM »

Paul that sounds great i really hope you are not forced to fall back on stamdard ai :]
good work
Logged


Say the opposite of these words:
1)Always.
2)Coming.
3)From.
4)Take.
5)Me.
6)Down.
ayoriceball
Donators
Jr. Member
***
Posts: 99


Control Magic


View Profile
« Reply #2 on: June 03, 2012, 03:42:28 PM »

Sounds like this will be what we want to show off, when it's ready Smiley
Logged

From Bay12Forums
Don't dwarven ladies know they're beautiful the way they are? They don't need to starve themselves to look like those elven bitches.
I have a skin, a potato has a skin, therefore, I'm God
Teknonick
Sr. Member
****
Posts: 438


View Profile
« Reply #3 on: June 03, 2012, 06:10:14 PM »

That sounds awesome! And I agree that the AI IS the game.... Its.. going... too.... be..... AWESOME!!!!!!
Logged
Ghelmaron
Donators
Jr. Member
***
Posts: 76


View Profile
« Reply #4 on: June 03, 2012, 08:53:43 PM »

No problem Paul. One of the big problems of "big name" release games is the game being rushed out when more fine-tuning should have been done and players being angry about bugs and patches. It is good to get the kinks out ahead of time.
Logged
BenKenobiWan
Friendly Moderator
Donators
Hero Member
***
Posts: 674


Jesus loves you!


View Profile
« Reply #5 on: June 03, 2012, 10:48:04 PM »

I'd rather you take another year to get the AI done than just do some sloppy job of it. I hope for this game to be something special, something new, and I think the AI might be the main defining feature, as you said.
I myself haven't been active around here lately either. I hope to change that eventually, but I'm cramming school right now, so...

Anyway, keep it up!
Logged
Moonkey
Hero Member
*****
Posts: 1587

This is probably a picture.


View Profile
« Reply #6 on: June 05, 2012, 04:42:47 AM »

Ooh. So, for example, when a wolf sees you when it is hungry/near den, it will stalk you in stealth looking for bushes etc. to hide in waiting for the right moment to strike? :3
Logged

Mythruna: Don't you dare read any posts I made before 2014.
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #7 on: June 05, 2012, 07:49:37 AM »

Ooh. So, for example, when a wolf sees you when it is hungry/near den, it will stalk you in stealth looking for bushes etc. to hide in waiting for the right moment to strike? :3

Heheh.  Something like that.  The bandit who hears you coming and must decide what to do about it is the example I've been using.  These are at the higher end of what I'd like to have.

Right now, I'll be happy if a mob is smart enough to figure out to pick up the key off the floor to open a door if his real goal is to get somewhere on the far side.
Logged
Moonkey
Hero Member
*****
Posts: 1587

This is probably a picture.


View Profile
« Reply #8 on: June 08, 2012, 03:45:23 AM »

For example: NPC Finds locked door! It Looks around and finds 3 open barrels and 1 barrel closed in a square room the door is in. It searches the 3 open barrels and finds nothing its last option is to open the closed barrel; but It can't open it with its hands. So it uses a tool in return, like a sword if it had one. Once the closed barrel is open, it finds a key! It then uses the key to open the door. The door opens it walks inside and finds a chest. It walks towards the chest but doesn't notice a tripwire and poison arrows fly out of the walls! That's why awareness needs to be added. Oh how hard this all will be. Smiley But it would be so funny to see that happen in a game.
« Last Edit: June 08, 2012, 03:48:26 AM by Moonkey » Logged

Mythruna: Don't you dare read any posts I made before 2014.
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #9 on: June 08, 2012, 04:37:41 AM »

For example: NPC Finds locked door! It Looks around and finds 3 open barrels and 1 barrel closed in a square room the door is in. It searches the 3 open barrels and finds nothing its last option is to open the closed barrel; but It can't open it with its hands. So it uses a tool in return, like a sword if it had one. Once the closed barrel is open, it finds a key! It then uses the key to open the door. The door opens it walks inside and finds a chest. It walks towards the chest but doesn't notice a tripwire and poison arrows fly out of the walls! That's why awareness needs to be added. Oh how hard this all will be. Smiley But it would be so funny to see that happen in a game.

The hard part is limiting awareness.  It's really easy to make the NPC know everything the game knows.
Logged
Ghelmaron
Donators
Jr. Member
***
Posts: 76


View Profile
« Reply #10 on: June 08, 2012, 05:14:05 PM »

For example: NPC Finds locked door! It Looks around and finds 3 open barrels and 1 barrel closed in a square room the door is in. It searches the 3 open barrels and finds nothing its last option is to open the closed barrel; but It can't open it with its hands. So it uses a tool in return, like a sword if it had one. Once the closed barrel is open, it finds a key! It then uses the key to open the door. The door opens it walks inside and finds a chest. It walks towards the chest but doesn't notice a tripwire and poison arrows fly out of the walls! That's why awareness needs to be added. Oh how hard this all will be. Smiley But it would be so funny to see that happen in a game.

Hey, that sounds like the game is playing itself. Aren't the (human) players supposed to be doing stuff like that?  Cheesy
Logged
randomprofile
Global Moderator
Sr. Member
*****
Posts: 265


View Profile WWW
« Reply #11 on: June 08, 2012, 06:57:07 PM »

Well, using this method right here...

Would it be hard to make it so the NPC can make it's own branches?
Logged
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #12 on: June 08, 2012, 08:01:37 PM »

That's a decision tree or state machine.  GOAP doesn't work like that.

You start with a goal, figure out what actions can satisfy that goal, figure out what actions can satisfy those actions' preconditions, etc... it's kind of like path finding except you are doing it through a state graph connected by possible actions.  The AI plans a set of actions (if possible) to reach some goal state.

This is why my AI figured out that it could cheat (in that other post).

You can find more than you ever wanted to know right here:
http://web.media.mit.edu/~jorkin/goap.html
Logged
Moonkey
Hero Member
*****
Posts: 1587

This is probably a picture.


View Profile
« Reply #13 on: June 09, 2012, 07:43:00 PM »

That's a decision tree or state machine.  GOAP doesn't work like that.

You start with a goal, figure out what actions can satisfy that goal, figure out what actions can satisfy those actions' preconditions, etc... it's kind of like path finding except you are doing it through a state graph connected by possible actions.  The AI plans a set of actions (if possible) to reach some goal state.

This is why my AI figured out that it could cheat (in that other post).

You can find more than you ever wanted to know right here:
http://web.media.mit.edu/~jorkin/goap.html

Or Basicly: A
                 C
                 B :3. Something horrible like you said stacking a letter on a letter and getting rid of it forever might happen. Hungry? List:

            Eat Current bread
            Steal Bread
            Starve

 NPC Eats current bread and this happens:

                Steal Bread
                 Starve

NPC Steals bread since it has no money to buy bread and it is not on the list. (Hence no money cancels out buy bread since buy bread wasn't there in the first place) and then this:

                          Starve.

     NPC stacks Starve on Starve.

                 NPC no longer hungers. D: It breaks the hunger for the NPC! Sounds scary.
Logged

Mythruna: Don't you dare read any posts I made before 2014.
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #14 on: June 09, 2012, 08:34:08 PM »

Heheh.  The point was that if there is some way that the world state can be cheated then the AI is just as likely (in fact in some ways more likely) to find it as a player.  For certain kinds of state.

The AI will be working with a simplified version of the world, after all.  It might know all of the different ways that it can open a door but not realize that it will knock over a vase, for example.  But, if it turns out that you can open a door by bumping into it a few times or something then the AI would find bugs like that.
Logged
Pages: [1] 2 3
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!