Annotated objects which drive behavior

Started by
85 comments, last by bishop_pass 20 years, 4 months ago
BStaz, thank you for the bump. This thread is not ready to sink to the bowels of GameDev yet.

If I wasn''t so darn busy I would be posing another companion thread to this one which would discuss constraints, their implementation, and their value to game state modeling, game scenario development and the situation creator, which I proposed in another thread.

___________________________________

_______________________________
"To understand the horse you'll find that you're going to be working on yourself. The horse will give you the answers and he will question you to see if you are sure or not."
- Ray Hunt, in Think Harmony With Horses
ALU - SHRDLU - WORDNET - CYC - SWALE - AM - CD - J.M. - K.S. | CAA - BCHA - AQHA - APHA - R.H. - T.D. | 395 - SPS - GORDIE - SCMA - R.M. - G.R. - V.C. - C.F.
Advertisement
Bloody hell... why didn''t I look at this thread 3 weeks ago? What a pain in the ass it is to try to catch up on 4 pages of deep stuff!

Anyway, fantastic stuff... I will hopefully be able to contribute some more as things roll on.

Dave Mark
Intrinsic Algorithm Development

"Reducing the world to mathematical equations!"

Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"


Am I on the right page, planet or solar system here??


* Every Object Can Have 1 or More States
-- A Door can be Closed
-- A Door can be Locked

* Every State Can Have 1 or More Transistions
-- A Tripple toggle switch (off the top of my head)

* Every Object Can Have 1 or Uses
-- A Broom can Sweep
-- A Broom can Break

* Every Use Can Have 1 or or More States it is useful for.
-- A Key has a use, that use can Unlock
-- A Key has a use, that use can Lock

* Every Transistion Can Have 1 or More Constraints.
-- A Door can transistion from Open to close but
the person opening the door must be close to the Door.

* Every Constraint Can Have 1 or More Constraints.

--A Door can transistion from Open to close but
first the door must be Unlocked.


This is kind of rough but not sure if I can get to it again till next week... I am trying to think along the lines of have the NPC being able to recognize items it can use based on what its state(s) is and what items it can see that will modify its state. Below I am thinking simply of the NPC realizing it is IN a room, the door has a Use called Out that will transistion the NPC from IN to OUT, but to do that it has to use a key.... sorry again about not fully finishing this off..

Object_List (

NPC(
State( In ) //comment -- In a room
State( Empty_Hand )
State( Empty_Hand )
)

Door(
State( Closed )
State( Locked )
Use( Exit )
)

Key(
State( Not_Owned )
Use( Unlock )
Use( Lock )
)
)

Use_List(
UnLock(
State( Locked )
)
Lock(
State( UnLocked )
)
Exit(
State( Out )
)
)


State_List
(
Closed(
Transistion( Open )
)

Locked(
Transistion( UnLocked )
)

Not_Owned(
Transistion( Owned )
)

In(
Transistion( Out )
)
Empty_Hand(
Transistion( Full_Hand )
)
)


Transistion_List
(
Open(
Constraint( UnLocked , Object )
Constraint( Near , Object )

)

UnLocked(
Constraint( Owned, Key, Actor )
Constraint( Near, Object )
)

Owned(
Constraint( Near , Object )
Constraint( Empty_Hand , Actor )
)

Out(
Constraint( Open, Object )
)

Full_Hand(
Constraint( Not_Owned, Object )
Constraint( Near, Object )
)
)
how the hell i doesnot know about this one :O BAD BAD BAD i could have save 1 mounth of intense thinking >
i have came to same conclusion but not that detail
almost 80% of my character engine is here....

>>>>>>>>>>>>>>>
be good
be evil
but do it WELL
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>be goodbe evilbut do it WELL>>>>>>>>>>>>>>>
This is a very intriguing topic and since I'm interested in AI, I found the whole discussion enlightening and have my own thoughts.

First off an object should store all the information about itself and what it can do. For simplicity I'll call things an object can do or be used for, aspects. Also objects can interact with other objects we will call those pointer aspects. The critical part of pointer aspects is the fact that only one of the objects needs to have the pointer aspects in order for it work. Objects also have qualities which describe the object.

*object*
name= "Ball"
size= "small"
wieght= "light"
aspect: Bounces
...(insert appropriate code)
aspect: Can be thrown
....
*/object*

*object*
name= "Bat"
size= "medium"
wieght= "medium"
aspect: Swing
....
aspect: Weapon
....
pointer-aspect: Hit [Ball]->aspect[0]
*/object*

It also struck me that despite the ideals that some aspect would require interconnectivity with other objects and npc in order to function correctly.
For instance take the example of the mirror. That could easily be done by having the reflection aspect get the reflection quality of the object or npc it trying to display. In that way it allow the inclusion of special features into npc, for instance if you don't want vampires to appear in mirrors then the reflection quality of the vampire could be set to hidden or a blank image in that way the mirror then shows nothing for its reflection. This would also allow for special reflections such as maybe there is a shape shifter race which can disguise themselves as anyone one, except that its reflection is always that of its normal self. Also by including default values into the reflection aspect of a mirror this allows for backwards compatibility with objects and npc that don't posses a reflection quality.

Also the idea of goals could be implemented by incorporating behavior into npc. Using pseudo reactions it should be possible to get the npc to perform certain action based on its surroundings. For instance if you look at the case of the diamond and the thief. By giving the diamond the quality "valuable", it separates it from other objects that characters would otherwise ignore. So the thief enters the room and looks around immediately it notices that diamond and recognizes it as valuable. Then analyzing the rest of the surrounding the thief arrives at a threat value this is the danger associated with whatever security the thief perceives in the room. Since there is only a glass case the threat value is well below what the thief considers dangerous it attempts the heist. The case tells the thief that it is locked. The thief knowing the objects it posses and the objects around it. Attempts to perform the open aspect of the case with which he has the requirements for and has the highest probability of success.

Lastly by providing the agents with learning it would allow them to determine all the aspects of an object that it can employ. For instance the caveman comes across a banana an object it has never seen before. The banana is added to the caveman known objects list and has all aspects initialized to 0(unlearned). The caveman could then experiment with the banana in an attempt to discover its aspects eventually allowing it known that bananas have the aspect "edible" and as such can be used for food. The experimentation could be accomplished by comparing the objects qualities to the qualities of other known objects and then attempting to perform an aspect of that object with the current object. Since each object knows all its own aspects it knows what it can do and attempting to do something it can't, would return a simple error. So the cave man sees that a banana is small and light, so then maybe associate it with a ball and attempt to throw it this results in a failure since the banana does not posses the throw aspect. Then it compares it to an orange and takes a bite out of the banana and discovers that is edible. This then changes the banana entry in the agents known object lists' aspect edible to 1(learned).

So... has there been any work done by the people in this thread on this topic since it began?

----------------------------------------------------
Writer, Programer, Cook, I'm a Jack of all Trades
Current Design project
Chaos Factor Design Document



[edited by - TechnoGoth on December 6, 2003 3:56:03 PM]
technogoth you should look at the ai forum too, there is discussion like this in process

>>>>>>>>>>>>>>>
be good
be evil
but do it WELL
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>be goodbe evilbut do it WELL>>>>>>>>>>>>>>>
A friend of mine was working on using this sort of idea for natural language processing. (it was about 15 years ago, and he never got past the "wouldn''t it be cool" design phase, but...)

Basically you could use it to resolve syntactic ambiguity (is this a noun or a verb?) by semantic context, and also do some semantic correctness testing.

There''s a good comparison with some of the models presented here:

Object {
actor: ...
action: ...
}

looks a lot like object-subject-verb in sentence structures. Indeed, it''s very much like frames in computational linguistics. Which makes a lot of sense; the same process you would use to extract semantics from syntax (via a lexical lookup layer) could easily be applied to extracting actions for NPCs given the objects in its environment (and their frames).

This topic is closed to new replies.

Advertisement