Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3 4

Author Topic: Burried Houses (AI Programming Project)  (Read 18273 times)

Outcast Orange

  • Bay Watcher
  • [SOMETIMES_SQUID]
    • View Profile
    • The Outcast Orange
Burried Houses (AI Programming Project)
« on: December 06, 2010, 07:37:17 pm »

Burried Houses is currently a simple AI simulation I've been building,
 but it will eventually be an interactive "experience" involving puzzling, diplomacy, and survival.

Debug list of short term memories:
Spoiler (click to show/hide)

Running in ultimate debug mode:
Spoiler (click to show/hide)

Current features:
- Long term memory of rooms, doors, and items
- AI Motivated by goal/action trees
- AI will create procedural goals to enter new doors found
- AI will create procedural goals to collect useful items found
- AI will wander to random rooms when there is nothing left to do
- AI creates short term memories of events
- AI can observe rooms through open doorways
- AI can create prerequisite goal relationships
- AI can unlock portals with keys
- AI can keep track of key/lock relationships

Next planned changes:
- ???
« Last Edit: December 27, 2010, 03:10:53 pm by Outcast Orange »
Logged
[7:53:55 PM] Armok, why did you demand that I don't eat you?
[7:54:34 PM] [Armok]: woooooo

Burried Houses - Platform Explorer Demo H - Cloud Scream

Outcast Orange

  • Bay Watcher
  • [SOMETIMES_SQUID]
    • View Profile
    • The Outcast Orange
Re: Burried Houses
« Reply #1 on: December 06, 2010, 07:38:01 pm »

I've been working on this AI project for the better part of a few months now (sparingly though).
It's finally hit the stage where I can work on it often without losing too much interest
 due to slogging through code and painful debugging issues.
The better part of a week was spent building in debug options and streamlining the debug procedure overall.
I've also gotten most of the really bad code out of the way.
My AI is doing some pretty neat tricks by now, and I thought I'd dump this back out into the public light.

Anyways, this project is a continuation/reboot/do-over of something I was working on for a few months last year.

The current AI creates a memory version of everything it comes into contact with,
 updating the status of things whenever they are present.
So far this only includes rooms, doors, and items.
The pathfinding also works well.

My AI has a built in goal tree with associated actions.
The only default action I've added so far is "wander"
 which will pick a room at random and have them path over to it.
The AI will always be driven by such goals and their associated actions,
 picking the best ones based on weight and success rate (currently built in).

Besides these basic goal trees they can create their own procedurally generated goal trees in certain situations.
When they see a door they haven't opened, the'll add a goal to enter it.
When they see a useful item, they'll create a goal to collect it.
These goals and goal-actions store vital information about the task for later use,
 such as the location of the task and the index of the objective in their memory.

So for now all they can do is wander around exploring stuff and collecting keys,
 but they have one more trick up their sleeve.
The AI stores short-term memories of every event that happens,
 which go into a list where they slowly rot until they are forgotten.
These events are currently remembered by the AI in short term:
   - Discovery of new doors or useful items
   - Actions performed such as walking between rooms
   - Collection of useful items

That is just about everything for now.
« Last Edit: December 06, 2010, 07:40:10 pm by Outcast Orange »
Logged
[7:53:55 PM] Armok, why did you demand that I don't eat you?
[7:54:34 PM] [Armok]: woooooo

Burried Houses - Platform Explorer Demo H - Cloud Scream

Supermikhail

  • Bay Watcher
  • The Dwarf Of Steel
    • View Profile
Re: Burried Houses (AI Programming Project)
« Reply #2 on: December 08, 2010, 09:12:29 am »

Hm, with some parsing, the text in the screenshot could almost become interesting... Err, I mean, besides actions, it would be cool if discoveries were in a better-readable form. Like, not "Portal Found", but "Orange has discovered a portal" or something.
Logged

Outcast Orange

  • Bay Watcher
  • [SOMETIMES_SQUID]
    • View Profile
    • The Outcast Orange
Re: Burried Houses (AI Programming Project)
« Reply #3 on: December 08, 2010, 10:02:55 am »

To be fair, the green text is for debug clarity. Only the white text is currently meant to be read by the user.

I actually plan on making some procedurally generated sentences later on for flavor.
Especially for things such as character interaction and to facilitate some of the puzzles later on.

Thank you for the input though, I've been a little starved lately.

EDIT:

There are potential future issues with my current goal structure, so I'm back in a planning state until I can decide on the best way to proceed.
I also have to put in prerequisite goals and actions so things can be performed in a proper order.
« Last Edit: December 08, 2010, 10:05:03 am by Outcast Orange »
Logged
[7:53:55 PM] Armok, why did you demand that I don't eat you?
[7:54:34 PM] [Armok]: woooooo

Burried Houses - Platform Explorer Demo H - Cloud Scream

Supermikhail

  • Bay Watcher
  • The Dwarf Of Steel
    • View Profile
Re: Burried Houses (AI Programming Project)
« Reply #4 on: December 08, 2010, 10:14:40 am »

To be fair, the green text is for debug clarity. Only the white text is currently meant to be read by the user.
I figured as much, "Err..." is where I did. I read the green text and thought it could be interesting, too.
Thank you for the input though, I've been a little starved lately.
No problem.
EDIT:

There are potential future issues with my current goal structure, so I'm back in a planning state until I can decide on the best way to proceed.
I also have to put in prerequisite goals and actions so things can be performed in a proper order.
Don't you try to abandon it! >:(

Seriously, sounds like an awesome idea and my dream.
Logged

Knight of Fools

  • Bay Watcher
  • From Start to Beginning
    • View Profile
    • Knight of Fools
Re: Burried Houses (AI Programming Project)
« Reply #5 on: December 08, 2010, 01:04:16 pm »

Sounds interesting: It's simple enough to take little processing, but complex enough to make a casual observer think that the AI was actually trying to do something.

I don't know why, but I keep thinking about how much more realistic it'd make First Person Shooter AI...

What are your ultimate goals for the project?  Are you just experimenting, or is it going to be a game (Or part of a game)?
Logged
Proud Member of the Zombie Horse Executioner Squad. "This Horse ain't quite dead yet."

I don't have a British accent, but I still did a YouTube.

Outcast Orange

  • Bay Watcher
  • [SOMETIMES_SQUID]
    • View Profile
    • The Outcast Orange
Re: Burried Houses (AI Programming Project)
« Reply #6 on: December 08, 2010, 06:25:56 pm »

The final aim is to have a sort of mystery puzzle situation with interpersonal diplomacy elements,
 sort of like if LOST was a video game with an AI cast.
The default would probably be direct control of a character,
 but it would just as easily run as a simulator giving the user full control over all content.

I imagine it would be fun to play the part of any of the deterring agents,
 not to mention some of the "regular cast" will have goals or causes which push them to be violent.
Examples would include characters with assasination orders, phycho killers, theives,
 and basically any sort of motivation, since we could just break it down into goals.

I think I'm going to look back through the code tonight and if I don't see any glaringly obvious issues
 I'll start working on prerequisite goals.

I abandoned projects before, sure, but I have been into this one for the better part of this year, at least mentally.
I don't think it will go pear-shaped like Cloud Scream.
I only wandered awy from that project in the first place in order to better focus on pure AI.
Logged
[7:53:55 PM] Armok, why did you demand that I don't eat you?
[7:54:34 PM] [Armok]: woooooo

Burried Houses - Platform Explorer Demo H - Cloud Scream

Outcast Orange

  • Bay Watcher
  • [SOMETIMES_SQUID]
    • View Profile
    • The Outcast Orange
Re: Burried Houses (AI Programming Project)
« Reply #7 on: December 12, 2010, 02:11:07 pm »

I've been working on prerequisite goals.
Now things can be done in proper order for situations that don't make sense otherwise.

I've also added these pictures to the original post:

Debug list of short term memories:
Spoiler (click to show/hide)

Running in ultimate debug mode:
Spoiler (click to show/hide)
Logged
[7:53:55 PM] Armok, why did you demand that I don't eat you?
[7:54:34 PM] [Armok]: woooooo

Burried Houses - Platform Explorer Demo H - Cloud Scream

Supermikhail

  • Bay Watcher
  • The Dwarf Of Steel
    • View Profile
Re: Burried Houses (AI Programming Project)
« Reply #8 on: December 12, 2010, 02:43:37 pm »

Whoah. Reading the debug text is like learning about quantum physics for the first time!

So I wonder if there is eventually going to be long-term memory, but more importantly if there is priority value for memories based on their emotional importance.
Logged

Outcast Orange

  • Bay Watcher
  • [SOMETIMES_SQUID]
    • View Profile
    • The Outcast Orange
Re: Burried Houses (AI Programming Project)
« Reply #9 on: December 12, 2010, 03:55:04 pm »

There will definitely be long term memories created from short term memories,
 and they will be emotionally weighted,
 but I don't think their weight will ever be used to keep track of how long they are remembered.
I know I have done nothing but impractical things so far,
 but that would probably cross the line into runs really slow for minimal gain territory.

For now just distinguishing between "permanent" and "not permanent" coupled with
 a sort of "importance" value ought to be adequate.
Logged
[7:53:55 PM] Armok, why did you demand that I don't eat you?
[7:54:34 PM] [Armok]: woooooo

Burried Houses - Platform Explorer Demo H - Cloud Scream

Hugehead

  • Bay Watcher
    • View Profile
Re: Burried Houses (AI Programming Project)
« Reply #10 on: December 15, 2010, 01:16:41 am »

This sounds cool, even though half the stuff you're saying is going right over my head. :P
Logged
We're Bay12er's. If there is a bug, we will find it, exploit it, and make a recursive statue out of it. Just look up Planepacked.
When a dwarf enters a martial trance, they become Jedi. Short, drunken Jedi.

Outcast Orange

  • Bay Watcher
  • [SOMETIMES_SQUID]
    • View Profile
    • The Outcast Orange
Re: Burried Houses (AI Programming Project)
« Reply #11 on: December 15, 2010, 01:37:23 am »

Thanks!

Just curious, what sort of stuff?

Also:

I HAVE been working on this a little bit.
My last finals are later today, after which I intend to get back into some sort of routine over break.
I've added in some framework for prerequisite goals and they should be working some time Thursday.
The idea is to make a system where every addition and change will add complexity across multiple levels.
The final result will hopefully be very interesting not only for you, but also for me.

It is my wish to make a game that I can myself enjoy.

Some day I hope to quote the line above this one.
Logged
[7:53:55 PM] Armok, why did you demand that I don't eat you?
[7:54:34 PM] [Armok]: woooooo

Burried Houses - Platform Explorer Demo H - Cloud Scream

Minstrel

  • Bay Watcher
    • View Profile
Re: Burried Houses (AI Programming Project)
« Reply #12 on: December 15, 2010, 04:40:47 pm »

I am wondering about the way you described the WANDER action. You say the AI picks a room and then paths to it.

Wouldn't true wandering be more like the AI choosing a random direction to go for a random amount of rooms, then choosing another random course of action, avoiding backtracking, but ultimately relying on it if it came to a dead end? Or will that be another mode, like SAUNTER?

Outcast Orange

  • Bay Watcher
  • [SOMETIMES_SQUID]
    • View Profile
    • The Outcast Orange
Re: Burried Houses (AI Programming Project)
« Reply #13 on: December 16, 2010, 10:06:14 am »

It will actually just pick a random room to go to, and if it still hasn't found anything better to do
 it will pick another room and do it all over again.

You end up with them wandering all over the place.
The cool part is if you weren't specifically told they were wandering you might assume they were up to something important.
If I was following one around for instance to see what they did I might get mixed messages from the wandering.
I would like that sort of espionage/sabotage to be carried out later by some AI characters,
 so it would be neat for them to sometimes end up with the wrong conclusions
 because their target just happened to be wandering around aimlessly at the time.

"Ooh, they go into that storage room a lot, maybe I should sneak into there when they sleep."
Logged
[7:53:55 PM] Armok, why did you demand that I don't eat you?
[7:54:34 PM] [Armok]: woooooo

Burried Houses - Platform Explorer Demo H - Cloud Scream

Outcast Orange

  • Bay Watcher
  • [SOMETIMES_SQUID]
    • View Profile
    • The Outcast Orange
Re: Burried Houses (AI Programming Project)
« Reply #14 on: December 16, 2010, 06:40:24 pm »

Progress!

I've added prerequisite goal relationships,
 which meant putting in a ton of framework.

I've finally gotten to a point where there is a noticeable result.
When making a decision about which action they will perform next,
 the AI will ignore any action/goal trees with prerequisite actions.

The current working example goes like this:
They won't try opening a door that they know is locked unless it is unlocked first.

Now I will add in some sort of key using trial and error procedures.
Logged
[7:53:55 PM] Armok, why did you demand that I don't eat you?
[7:54:34 PM] [Armok]: woooooo

Burried Houses - Platform Explorer Demo H - Cloud Scream
Pages: [1] 2 3 4