|
||||||||||||||||||
Add Forum to Favorites | Send Topic To a Friend | View Forum FAQ | Track this topic Page: 1 2 3 »» |
Last Thread Next Thread ![]() |
| RPG NPC AI, Scheduling and Needs... |
|
![]() Ingenu Member since: 1/3/2000 From: Maisons-laffitte, France |
||||
|
|
||||
| Here's a new threads following the idea of the NPC AI in RPG (2. The topic begin to be too long to me Here's a summary of the system: Base Schedule for any NPC. Schedule overriden by the need based system. Need system can be extended to reflect a little more than needs. (Or solutions to suppress them) AI Module written in C++. (So OO) Module since it might be used to create a DLL, or to be integrated in a game code. I'll do the list of the basic needs. (I know I must do it since some days now -* So many things to do, so little time to spend. *- |
||||
|
||||
![]() MikeD Member since: 8/20/1999 From: Guildford, England |
||||
|
|
||||
| As a slight augmentation to a simple schedule, which would generally be fairly restrictive. How about a list of tasks and an associated heuristic as to when they should be carried out. Each task in a standard schedule has a list of actions which are necessary for it's completion. For a baker a list of tasks might be something like, obtain wood, obtain ingredients, bake bread, go to pub, buy personal groceries from market etc. Each of these tasks being split up into ordered actions i.e. bake bread consists of, light wood in oven, mix dough, place dough in oven, let cook for 20 minutes. The tasks could be ordered by a heuristic that places a value on carrying out each task, the lower the number the loaves in the shop the higher the heuristic for baking more loaves, the less food in the bakers larder the more likely they are to go to the market. Some tasks can be more definately ordered by overriding areas of the heuristic. If it's 5 am bake bread, if it's past 3pm don't. As long as you keep it simple you can't go wrong. (HA) Mike |
||||
|
||||
![]() Altmann Member since: 3/10/2000 From: France |
||||
|
|
||||
| I repeat what I just posted on the previous thread : try not to lock yourself into DLLs. Another thing is that you might not want to do everything in C++ in the first place. You might prefer prototyping in Java first. And I would definitely prefer using a garbage collector. Anyway, there is a need for an Agent and a Message construct. In my opinion, it could look a bit like :Message is
Agent can
What else ? |
||||
|
||||
![]() dwarfsoft Moderator Member since: 6/5/2000 From: Toowoomba, Australia |
||||
|
|
||||
| After reading Mikes post I was thinking about how you would go about constructing a task based approach. With pre-requisites for other tasks, you could create a threaded list that requires a lower thread to have been completed before it can be started. This way the NPC could be able to switch between different threads (and different tasks) making it appear like they are multitasking. The NPC might have a thread like so: Buy grain -> make flour -> "flour" flag is set Get urn -> Get Water [in urn] -> get bowl -> pour water in bowl -> "water" flag is set flour\____> pour flour in bowl -> Make bread water/ This kind of is threaded both ways (I realised this after starting the example). The flour and the water tasks are BOTH required to make the bread. I am not sure how this could be programmed, but Linked Lists do come to mind Just some more food for though. -Chris Bennett ("Insanity" of Dwarfsoft) Check our site: http://www.crosswinds.net/~dwarfsoft/ and our eGroup: http://www.egroups.com/group/dwarfsoft |
||||
|
||||
![]() Altmann Member since: 3/10/2000 From: France |
||||
|
|
||||
| Not to criticize but ... seems to me like an awfully complicated way to describe Petri Nets. Ok, I wanted to criticize |
||||
|
||||
![]() Ingenu Member since: 1/3/2000 From: Maisons-laffitte, France |
||||
|
|
||||
| Many threads...many problems I do think there must be an easier way to do the trick. Don't forget we'll need to manage dozens to thousands of NPC with that system, so that must be fast and efficient. And easy to programm and debug Will think about the design... -* So many things to do, so little time to spend. *- |
||||
|
||||
![]() dwarfsoft Moderator Member since: 6/5/2000 From: Toowoomba, Australia |
||||
|
|
||||
| I am not a bitter man, and criticism does tend to offer better results in the long run, provided it is constructive Personally, I have not touched Neural Networks or Genetic Algorithms. I have heard of some very interesting stuff about them. Do you know of any good sites on the net that could be useful? Anyways, I am sure there has to be an easier way. But we don't really need to be considering thousands of NPC's just yet. One NPC would be an achievement. Diablo II keeps chunking up too much with NPC's running around the screen (and getting killed I am thinking of posting up a summary of our Posts on my site. Just a thought at the moment, but I need some material on my site. What do you think? -Chris Bennett ("Insanity" of Dwarfsoft) Check our site: http://www.crosswinds.net/~dwarfsoft/ and our eGroup: http://www.egroups.com/group/dwarfsoft |
||||
|
||||
![]() MadKeithV Moderator Member since: 2/18/2000 From: Hasselt, Belgium |
||||
|
|
||||
| http://www.gameai.com ( How concise can i get Give me one more medicated peaceful moment. ~ (V)^|) |<é!t|-| ~ ERROR: Your beta-version of Life1.0 has expired. Please upgrade to the full version. All important social functions will be disabled from now on. |
||||
|
||||
![]() Alexander Nareyek Member since: 7/11/2000 From: Berlin, Germany |
||||
|
|
||||
| Here are some pointers to academic sites that might be of interest: Autonomous Agents: http://www.ai-center.com/links/applications/agents.html Planning: http://www.ai-center.com/links/applications/planning.html Scheduling: http://www.ai-center.com/links/applications/scheduling.html A game AI research project that covers it all: http://www.ai-center.com/projects/excalibur/ Best, Alex Edited by - Alexander Nareyek on July 11, 2000 11:39:41 AM |
||||
|
||||
![]() CodyVa Member since: 4/30/2000 From: Stockton, USA |
||||
|
|
||||
| are you people actually programming this stuff yet? or just theorizing? i'd love to play anything you guys have! anyways new, just read some posts. dos: stay forever! scheduling. I never played the sims or anything but i guess this is sorta like it what about npc emotion? And dialogue? I mean depending ont he type of game and setting, what if I(the player) wants to keep an npc?(join party, whatever) how are npc's gonna remember stuff? I remember the goblin and dwarves thing somebody mentioned. I was playing with a sims type game but never made it(no skills) where all the npc's had ratings of everybody and thought good or bad of somebody in specific area, like trust, love, and some others and dialogue would be by events, npc's remembered events and passed (told,gossiped) them along to others heard, seen, experienced. who what where when idea. and that also affected ratings and their todo list. they had priority as in they wouldn't go do something for the player unless his rating met the requirments... I wish i could but now that i see these posts it makes me think my idea wasn't as dumb. just offering ideas that's all |
||||
|
||||
![]() CodyVa Member since: 4/30/2000 From: Stockton, USA |
||||
|
|
||||
| again. About the elves and goblins not liking each other, maybe that's just a stereotype(int he game) and once they get to know each other that will change? About npc's and food. (I'm basing my thoughts on final fantasy type games) Maybe it's not that person that has the food, but the house that has the food, so people living in the same house can split chores, such as wife gets this, husband gets that, while the kids just play all day, who they play with and where they shop (if multiple shops) is determined by the rating of the shop? Well i'm not gonna post till i see good or bad replys...bye |
||||
|
||||
![]() Thp Member since: 7/8/2000 From: Tuvalu |
||||
|
|
||||
| I love the idea (expressed earlier) of NPCs being scheduled, and if anyone cares to hear my opinion, I have another interesting idea regarding messaging between NPCs. I'd say one would just want to represent speech as a universal communication that is recieved by all nearby NPCs and the player: An NPC who wanted to buy bread or whatever, would walk into a bread shop, and approach the counter and say, "I'd like to buy some raisin bread." Which would be broadcast to nearby players and NPCs. The baker would respond via speech, such as, "That'll be 4 gil," or "Sorry, I sold the last raisin bread a little while ago," or whatever, and the hungry NPC would get the idea and give money to him, upon which the baker would give him the bread. With messages and transactions being broadcast that way, NPCs could react to things happening around them. If another NPC is just outside and the door is open, she may hear the man buying bread and think, "Hmm, now that you mention it, I could really go for a loaf of bread right about now." Essentially my thought is that we need to make NPCs react more *visibly* to one another than just passing silent messages and objects from one NPC to another with little more than perhaps a "hungryman buys a loaf of bread." Think of it this way: you don't just walk into a bakery, hand some money to the guy behind the counter, and take a loaf of bread. (at least, I don't.) More often, you walk in and if there's not many people there, he says, "Hi, how can I help you?" Or if the room is packed, he might not even notice until you come to the end of the line. It's always a dialogue rather than a plain old exchange, and if you tell the baker "gee, my dog died and I'm really depressed," someone else may overhear you and comment on it or be affected by it. I doubt this makes any sense really, because I'm not sure what I'm saying myself, but owell. O;. +------------------------------------------------ | Thp :: Threep2742@worldnet.att.net | "Nature uses only the longest threads to | weave her patterns, so each small piece | of her fabric reveals the organization of | the entire tapestry." -- Richard P. Feynman |
||||
|
||||
![]() CodyVa Member since: 4/30/2000 From: Stockton, USA |
||||
|
|
||||
| I don't think i want to play a bakery sim. |
||||
|
||||
![]() Ingenu Member since: 1/3/2000 From: Maisons-laffitte, France |
||||
|
|
||||
| ok first, you can join our mailing list:* If anyone wants to subscribe to the mailing list then NPCAI-subscribe@egroups.com is the address to send to. The main page for the group is http://www.egroups.com/group/NPCAI/ and to post you send to NPCAI@egroups.com. second : gosh ! I forgot the children... That's not really a problem but this make me think we'll need to have modular/configurable NPCs. I think the idea of writing dialogs on screen are optionnal, so the system will propose some kind of dialogs but it'll be up to the programmer to choose if he wants the dialogs to be visible on screen. About the idea of the house containing food... Good idea. I'll note that somewhere Rating the shop and keeping everyone status to each other is something interesting. And yes something like that is included in the porject. see : http://www.multimania.com/ingenu/IAModule.txt this text file for more informations on what is or isn't included NPC have 5 senses like us real humans. So they are able to hear any message send near them. Maybe this message can change his task... I'll talk about that in the mailing list. Please remember the NPC are for a RPG, not a sim's like game -* So many things to do, so little time to spend. *- |
||||
|
||||
![]() dwarfsoft Moderator Member since: 6/5/2000 From: Toowoomba, Australia |
||||
|
|
||||
| You could have NPC's in sims... That would be memory innefficient, take ages to update etc. You may, however, put AI on the other player (ie, NPC) so that a computer could play. But I think that is way out of our grasp for a while -Chris Bennett ("Insanity" of Dwarfsoft) Check our site: http://www.crosswinds.net/~dwarfsoft/ and our eGroup: http://www.egroups.com/group/dwarfsoft |
||||
|
||||
![]() shamen Member since: 7/4/2000 From: Montreal, Canada |
||||
|
|
||||
| My thoughts on basic AI for an RPG are as follows: Firstly shouldnt everything by based upon Stimuli and associated Responses? Stimuli can be external (man sees a bear), or internal (man becomes hungry). Each response (corresponding to a stimulus based upon choices) is then broken up into goals. Hunger could be broken up into 3 high level goals. Find Food. Prepare Food. Eat Food. Find food could then be broken down into sub-goals and so on. Goals would have relationships assigned to them (could be simple AND/OR/XOR operations). Using this method, goals can be reused for different stimuli. Plus new associations between Stimuli and responses can be made (based on viewing stimuli and responses from other entities) which creates learning. And this all lends itself nicely to OOP. Just a thought. |
||||
|
||||
![]() Ingenu Member since: 1/3/2000 From: Maisons-laffitte, France |
||||
|
|
||||
| That's the knid of system we are talking about and trying to programm -* So many things to do, so little time to spend. *- |
||||
|
||||
![]() Nazrix Member since: 3/13/2000 From: Orlando, <s>USA</s>Tiberia |
||||
|
|
||||
| yeah, I like that... "The road of excess leads to the palace of wisdom." --William Blake "The road of excess also just ends making me tired because I'm too lazy" --Nazrix |
||||
|
||||
![]() Ingenu Member since: 1/3/2000 From: Maisons-laffitte, France |
||||
|
|
||||
| Have you join our mailing list, Nazrix ?? If you don't already joined us, I hope you will :o) -* So many things to do, so little time to spend. *- |
||||
|
||||
![]() Nazrix Member since: 3/13/2000 From: Orlando, <s>USA</s>Tiberia |
||||
|
|
||||
| Yes, I have I haven't had enough time to read all of them though. I should do that. One idea I had last night for a more non-linear game: What if we had a need-based system combined w/ a schedule, and the non-linear plots would only happen when NPCs actually come near each other in the world. So, say one NPC is scripted to murder another NPC at some point of the game. And, the player is then told to avenge the death of the murdered NPC. ....(lame, but simple).... Instead of this happening at a set point in the plot, it could only happen when the 1st NPC comes in contact w/ the 2nd NPC. And, since we're using a need-based w/ a schedule, the NPCs would meet at different times each time you play because they'd probably have different needs each time you play. So, they'd find each other at different times. This could also work with the NPCs exchanging information like dwarfsoft was speaking of. If the 2nd NPC is scripted to tell a confidential secret to another NPC, (and that's why he gets killed) then he won't get killed until he finds the NPC to tell the secret. And THAT would happen at different times in the game too. So, it may be a bit chaotic, but it would seem like the NPCs were more alive. "The road of excess leads to the palace of wisdom." --William Blake "The road of excess also just ends making me tired because I'm too lazy" --Nazrix |
||||
|
||||
![]() MikeD Member since: 8/20/1999 From: Guildford, England |
||||
|
|
||||
| Nice idea Nazrix and non-linear game devices as a whole are a good concept to avoid stale FFVIII style adventures. However there is the problem that, in a chaotic world, the situation could turn against the intention of the game designers. What happens if, because of a certain series of unlikely but possible events, the NPC's don't bump into each other for days? This leads to a fairly long-winded boring episode for the player. The less constraints placed upon the plot the more chance there is for circumstance to conspire against the designers and lead away from good, tight game play. On the other hand the more constraints placed upon the game the more linear the plot development and the more likely you are to end up with a scene-by-scene forced storyline. I think main plot lines should be more directly scripted in terms of player circumstance (where the player is at a given time, not where an NPC is) leaving the non-linearity to minor plot-lines and less consiquential occurences. From my point of view I'd love to see a world expand based on the intelligences of the NPC's and what they decide to do at any given time but unless you want the possibility of a meandering experience then you have to have some form of constrained sequencing to the game. Just my $0.02. Mike |
||||
|
||||
![]() Nazrix Member since: 3/13/2000 From: Orlando, <s>USA</s>Tiberia |
||||
|
|
||||
| Yes, MikeD, good point. An idea like this would have to be compromised a bit. It couldn't be too far on the side of chaos. However, the way that I'm envisioning this, the player wouldn't be simply waiting for the situation where the 2 NPCs come together. If there are a lot of NPCs then the chance of something happening would pretty good. Furthermore, one situation of 2 NPCs coming in contact may trigger a few other plots w/ it which would keep the player busy. "The road of excess leads to the palace of wisdom." --William Blake "The road of excess also just ends making me tired because I'm too lazy" --Nazrix |
||||
|
||||
![]() Samah Member since: 1/26/2000 From: Adelaide, Australia |
||||
|
|
||||
| On the point of chaos avoidance, here's a suggestion... What if the computer told the NPCs involved that due to a scripted plot event (ie. a murder needs to happen in the story), they have a certain amount of time to make this "chance meeting" happen. One NPC could be at the bakery, while the other is on his way to the barber. Although the barber might be on the other side of the town, the second NPC knows that he needs to perform this scripted plot sequence within a certain amount of time, so he makes a detour to walk past the bakery on his way to the barber. If it has run out of time to perform the plot sequence, he just goes straight to the bakery for no good reason at all, and hopes that the player won't think this strange. Either way, upon reaching the bakery, the other NPC senses this and knows that she must perform her part of the plot sequence... Not sure how this could be implemented, but it's an idea... Samah "...the grave is no bar to my call..." - The Horn Of Valere |
||||
|
||||
![]() Ingenu Member since: 1/3/2000 From: Maisons-laffitte, France |
||||
|
|
||||
| What about a simple new need : "Kill X NPC" in the system ? It would be easy to add and will give you the expected result. Just an idea :p (Since needs are prioritized, you can give it a low priority to have it done sometime in the future, or a high one to have it done in a few minutes -* So many things to do, so little time to spend. *- |
||||
|
||||
![]() Steel Member since: 7/18/2000 |
||||
|
|
||||
| You know, I've been reading alot of threads like this about realistic NPC interaction. Ultima 7 did it really well without overdoing it. It's amazing what those guys accomplished with a 80386 processor and 4MB RAM. The Ultimas invented a while ago the kind of NPC realism we're trying to accomplish. |
||||
|
||||
|
Page: 1 2 3 »» All times are ET (US) ![]() |
Last Thread Next Thread ![]() |
|