Annotated objects which drive behavior
Aside from that, it is interesting, but I don''t have time at the moment to look closely at it. If you wish to post again explaining the theory behind it, I''m sure we would all be interested. Also, I direct you to my last post which makes powerful use of predicates, which you are using in your code. Read very carefully how I explaing that my predicates are world states, goals, and constraints depending on their context, essentially making the knowledge of actions non-opaque.
___________________________________
"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.
The key, I think is to define intelligence - or maybe we should call it creativity - in terms of the semantic net. An unimaginative person sees a "butter knife" and "hears" only "eat with me," because that is the only activity specific to a "butter knife;" he only looks at the "butter knife" object''s properties. A more creative person, however, traces out through the semantic net to realize that "butter knife" is inherited from "knife." Now I''ll introduce another relationship: "similar to." Because "similar to" is qualitative, a value needs to be given to any such relationship defining exactly how similar the two things are. Less creative people recognize only similarities with very high values. Now this more creative person realizes that "knife" is "similar to" "sword," and then that "sword" is a "kindof" "weapon." I''ll say now that, all along, his goal had been to break out of a dungeon. A heavy oaken door is locked and keeps him inside. The "oaken door" object has the "break me to get out" property, so a sub-goal of his is to break the door. Since "sword" is a type of "weapon," and "weapon" has the "breaks stuff" property, he then decides to attack the heavy oaken door with a butter knife in the hopes of escaping.
As an agent traces out through the semantic net, he keeps a product of the different similarity coefficients he has traced through. If it exceeds a certain value, he stops tracing out, and the recursive process continues in another direction.
The point in this example was to create interesting behavior, not to create useful behavior. By keping creativity coefficients realistic and by keeping agent''s "creativity" attributes relatively low, only straightforward solutions would be attempted. However, allowing for agents to occasionally make seemingly illogical connections - though within reason (not quite as illogical as attacking a heavy oaken door with a butter knife!) - would enhance rather than detract from the player''s experience, by creating interesting emergent behaviors.
Incorporating multiple agents into the semantic net itself would create particularly interesting scenarios.
The main purpose of annotated objects as bishop_pass first described it was to keep knowledge about using objects in the objects. Since then the focus of discussion has been mainly on the use of these annotations to drive better NPC behavior. But there''s no reason why object annotations need to be seen only in this light. Annotations can do something else as well: they can store usage information for PCs as well as NPCs and thus simplify controls.
Here is what I mean. When a PC interacts with an object, his interaction with it must be specified in the same way as an NPC''s interaction is specified. That specification, through the "annotated objects" concept, could be stored in the object itself. The PC can have context-sensitive goals just as an NPC can, and a PC will use an annotated object in the manner most suited to his goals. This simplifies control of the PC and creates a wider range of PC actions.
That was a little abstract. Here''s a practical example. Let''s say the PC is in a room, and there''s a Broom on the floor. The player has two commands he can give the PC in addition to movement: "use" and "switch function". The player moves the PC to the Broom and hits "use." The PC pings the Broom for uses. The broom then sends a list of possible uses, tagged with various qualifiers. Since a Broom is derived from a Stick it can be used like a Stick: to hit things, poke things, prop things open etcetera. As it is a Broom it can also be used to sweep. Since the PC has no particular need to do anything, he chooses the use which is tagged as most obvious: sweeping. Obeying the information on skeletal animations sent from the Broom, he picks it up and holds it in a sweeping position. The player can now hit "use" again to make the PC sweep the floor.
Now let''s add another object to the room: a pile of mysterious Goo. The player once again directs the PC to the Broom and hits "use." When the PC entered the room, he "observe-pinged" so he knows that there is a Broom and there is Goo. Now he "use-pings" the Broom. Once again the Broom lists its functions. Now the PC is not in a neutral state: there''s something mysterious in the room. By "mysterious" I could mean either an adjective tag on the Goo or the fact that the Goo has not been seen before and is therefore unknown to the PC. Now the PC chooses the use tagged "investigative": he picks up the broom by one end and sticks the other end out for poking things.
The second button, "change use," is used to cycle among the possible uses of the object currently under use. The cycling goes down a priority list according to the circumstances. In the case of the Goo, the next use on the list after poking would probably be whacking, as unknown things have a chance of being dangerous.
By implementing annotations in this way, one greatly simplifies the controls of "adventure games" where using items is a major factor in gameplay, as well as in RPGs where a wealth of items are usually present. Instead of having to specify the use you want each time, the use you want is more often than not already chosen when you ready the item.
I realize this is rather complex and terribly abstract, but I think it''s a line of thought well worth pursuing. Not having to micromanage the PC could be as significant an improvement as creating smarter NPCs.
---------------------------------------------------
-SpittingTrashcan
You can''t have "civilization" without "civil".
Consider a machine which you have never seen before. It is matt grey and perfectly spherical, with no distinguishing markings or textures of any sort. To you, it's a ball. To a member of the alien civilisation that built it, it's a Floogleblotz that can be used to destroy entire planets or bake cream puffs. Is it really feasible that the machine broadcast the messages 'Destroy planets with me!' and 'Bake cream puffs with me!' to every NPC that approaches it?
Instead, I propose that NPCs store a list of object relationships and uses internally. NPCs will be generated with a preformed knowledge base of objects based on common knowledge; for example, weapons can be used to kill people, food can be eaten, and a number of objects can be classified as weapons or food. The object 'weapon' in itself is abstract, but many objects can be thought of and used as weapons. Further association can take place; inheritance and similarity can be used together to create webs of object relationships.
Using the example of bananas and apples from earlier:
An NPC is generated with the knowledge that the abstract object 'food' can be eaten. After some experimentation with an apple, the NPC discovers that it can also be eaten. Since the only condition for an object to be food is that it is edible, the NPC creates an inheritance relationship between 'food' and 'apple': an apple is a kind of food.
Now the NPC is confronted with a banana. More experimentation takes place and at some point the NPC notices that the banana can also be eaten. Therefore, a banana is also a kind of food and another inheritance relationship is formed. If the NPC encounters a steak, it will discern a difference between the steak and the two types of food it has hitherto encountered. It creates a new abstract object, 'fruit' that apple and banana inherit from. The steak is food but not fruit. Some properties of fruit but not steak that the NPC may have noticed are flavour, ability to grow into trees, colour, etc.
An NPC who is hungry will know instinctively that it can eat 'food' to satisfy its hunger. It pings the area for any objects it can sense. All the objects that respond to its ping are compared to its internal knowledge base, and any that are close enough to any object that inherits from 'food' are possible food. Then more detailed checks are made, to determine the most efficient food source, the most tasty (if hunger is not the most important motive at the time), or possible sources of food outside the NPC's current sense range.
The main point here is that what an NPC is likely to do with an object is based primarily on the NPC's knowledge of that object. A caveman won't instinctively know that he can play soccer with a soccer ball, but he will know that it is similar to other balls he has seen before and may have some similar properties. This approach is more object-oriented, as an NPC's knowledge of an object is encapsulated within that NPC rather than being a property of the object.
An apple doesn't 'know' that it's a kind of fruit or food, that's something that an NPC learns about apples.
Edited by - Dracoliche on January 27, 2002 6:15:13 AM
http://web.media.mit.edu/~minsky/papers/Frames/frames.html
-potential energy is easily made kinetic-
-potential energy is easily made kinetic-
We have been discussing how objects make available different information (or different layers of information) to different NPCs, depending on their intelligence, culure, etc. The point of encoding the information with the objects is strictly to organize within the designer''s mind the relevant facts which pertain to each type of object. It does in fact become knowledge of the NPC.
With respect to the apple, banana, and steak, what you describe presupposes a simulation environment which already has knowledge about all of the traits of such items, including if they are food or not. So, regardless of whether the NPC knowws it yet or not, that knowledge needs to be entered in the form of some type of semantic net. Given that, it seems better to decide which of that knowledge is available to the NPC. In the case with the apple, banana, and steak, I would hope all of the NPCs already have access to all of the knowledge about them being food. It is frutless to have your NPCs learn this knowledge.
___________________________________
"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.
For instance, it will answer to a human''s call for food, but it will not answer a green alien''s call for food. OTOH, a banana will answer a request for atomic fuel by the green alien.
An example of knowledge and learning is my prototype I poste d about in the other thread on annotated objects. There the NPC doesn''t know that the glass of a glass case is very strong, so he tries to hit it and break it. He fails. He learns from his mistake and doesn''t hit it again. Instead he tries to scratch it with a key and then hit it. He succeeds and gets the diamond inside the case.
The NPCs knowledge about an object (oddly enough) can also be stored with the object and not with the NPC. Just another way of looking at things.
Thank you. Marvin Minsky is one of the most respected figures in the field of AI. Frames are interesting and have served as a guiding method of defining knowledge within semantic nets. Doug Lenat made use of them with AM and then EURISKO before he went on to found CYC. The article was written in 1974. Today, most frame systems have evolved into FOL (first order logic) systems employing the full expressive power of predicate calculus, using resolution to maintain knowledgebase integrity. Unfortunately, resolution is a thorny problem on large knowledgebases. One avenue of research to constrain the search problem encoutered with resolution refutation is the notion of partitioning the knowledgebase with minimum vertex separators.
A knowledgebase partitioned with minimum vertex separators enables resolution refutation to proceed in sections, seeking to solve the problem within a certain partition before branching to another parition. This is analogous to the concept of microtheories, which are domains of knowledge. Microtheories, or partitions, do connect to everything else, just as commonsense knowledge is connected to everything else, but often the solution lies within the microtheory itself.
___________________________________
"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.
I figured u might have heard of the guy . The main reason i posted the link lies in his definition of frame. A ''frame'' the way I see it is meta-data, more over it can provide a data structure for situations. Instances of frames are memories and sets of frames are an NPC''s intelligence. Frames can provide the precedence for the NPC''s in your system.
The intelligence of your NPC''s could be provided by symantic nets of ''frames'' to provide both memory and reasoning abilities. Frames combined with pattern matching could allow your NPC''s to infer what to do in similar situations, maybe even unsimilar situations by frame ''addition''. Tuning what frames a NPC has in its net or even applying weights to them can give NPC''s seemingly unique ways to go about trying to solve a problem.
Uniqueness and intelligence must be accomplished for the illusion of a living world. The annotation provides the intelligence, the frmaes can provide the uniqueness. In the context of the annotated objects I also believe this can be used to limit the intelligence of the NPC''s, which I feel is important because even though the point is the NPC should seem intelligent I also believe the player will eventually get pissed if the NPC continually beats him/her to solving puzzles and the sort. The NPC already has the advantage of an ''intrinsic UI'' versus the players'' so the game might become to difficult, or discouraging if the NPC''s are ''superhumans''.
SpittingTrashcan, I completely agree with what you said about the annotations supplementing user controls. It would really simplify controls and provide a better gaming experience. You weren''t being abstract either, it would be great for a control system to provide functionality without adding to the button count.
-potential energy is easily made kinetic-
-potential energy is easily made kinetic-