View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003415 | The Dark Mod | AI | public | 14.05.2013 20:06 | 04.07.2013 02:20 |
Reporter | tels | Assigned To | grayman | ||
Priority | normal | Severity | tweak | Reproducibility | N/A |
Status | resolved | Resolution | fixed | ||
Product Version | TDM 1.08 | ||||
Target Version | TDM 2.00 | Fixed in Version | TDM 2.00 | ||
Summary | 0003415: AI greeting can occur too often for stationary AI or multiple AI in a group | ||||
Description | AI greeting each other (or now the player) can greet too often when there are multiple AI or the AI are stationary (like sitting, friendly card players). The current setup (20s then a 30% chance) leads to about one greet per minute. In some cases the sentences are ok (like "quiet night, huh?"), but since the greeting also contain lots of actual greets like "hello", "evening", the friendly AI often sounds like suffering from Alzheimer. Possible solution is to increase the dead time (time until a specific other actor is greated again) from the default of 20s. Alternatively, some non-greet generic sentences could be added (but this seems much harder esp. as it needs voice actors). | ||||
Steps To Reproduce | Start Dragon's Claw and go to the pub, walk around for a few minutes and listen to the multiple greetings that occur between AI and AI and the player. | ||||
Additional Information | http://forums.thedarkmod.com/topic/14693-fun-moments-testing-tdm20/page__view__findpost__p__311384 | ||||
Tags | No tags attached. | ||||
Upon looking deeper into this, I see that once the decision has been made to attempt a greeting (20s has passed, and the 30% chance has been met), the greeting is passed to a task that disallows the greeting if 3 mins haven't passed since the last greeting to the same AI. So there's already a minimum 3 min period of silence between greetings to the same AI. AI->player doesn't have this second 3 minute check, because it doesn't use the greeting task. I'm going to let the folks in the Dragon Claw pub tell me how often they greet their friends and the player, to double-check and make sure the periods of silence are honored. |
|
I definitely think there should be more than a 20 second delay for AI -> player greetings. | |
Absolutely. The nice thing is that it's simple to change the delay, so we could try different values. |
|
Here's the setup in the inn: 2 in a back room, playing cards together 2 in the front room, playing cards together 3 in the front room, sitting together at the same table 1 in the front room, sitting by himself 1 barmaid wandering around The first greeting was at the 2.6 minute mark. I had arrived by then and taken up a position near the table of 3. Over the span of the next 19.5 minutes, there were 81 greetings. I was greeted 13 times by the table of 3. I was greeted 3 times by the wandering barmaid. The 3 people at the table exchanged 18 greetings among themselves. The cardplayers in the back room exchanged 6 greetings with each other. The cardplayers in the front room exchanged 5 greetings with each other. The barmaid initiated 17 greetings while wandering. The barmaid received 11 greetings while wandering. The average silence between greetings lasted 14.5 seconds. ------------------------------------------------------ I think we need different rules based on whether AI are stationary or moving, and how long it's been since you last greeted a particular person, or they greeted you. Not sure what they are yet, though. |
|
Here are the current rules (after some tinkering last night): If I'm stimmed by someone and they're < 200 from me, I want to greet them. If 20s have passed since the last time I tried, check the odds of greeting them. There's a 30% chance of success. If that passes, and their eyes are w/in my FOV, I'll try to greet them. If it's been less than 3 minutes since the last time I greeted them, I can't. Otherwise, I greet them and they return the greeting. These rules are the same when spotting the player. |
|
@Spring, you have any comments on this? I'm thinking one or more of these might be in order: 1. Extend the delay between greetings from 3 mins to 10 mins. 2. Eliminate the 30% chance check and add a random time to the delay. Same effect, but it prevents skipping a greeting opportunity, which could become a problem when the delay is lengthened. 3. Vary the delay based on whether one or both AI are moving or not. 4. Only allow a greeting to occur if the AI are within a certain distance from the player. Greetings carry no useful information; they're just there for entertainment value, and are worthless if they occur outside the player's hearing. |
|
I think # 4 should play a factor; players probably spend less than 10 minutes in the vicinity of any particular AI, so that could result in the player missing many greetings. On the other hand, you don't want a whole bunch of AI suddenly greeting each other the moment the player comes in range. Another possibility would be to separate the "hello" greetings from the other question/comment ("quiet night?") greetings. It's the former that sound odd when they come up frequently. I don't know, to be honest I haven't seen this as a big problem during testing; but I haven't been in a big room with lots of AI yet either. |
|
81 greetings in 20 mins is a bit excessive, so we should do something. Separating the "hello" greetings from the others would help. Then we just issue the "hello" greetings once. It would require that # 4 be implemented, otherwise the player will never hear any of those. The downside of that is that the pub in Claw should not allow any "hello" greetings because those AI have all been sitting around for a while before the player gets there, and would certainly have gotten all the "hello"s out of the way. Perhaps the "hello" greetings should be reserved for when at least one AI is moving. In that case, it's believable that the two AI are meeting for the first time. Save it for when the player is w/in earshot, though, otherwise he won't hear it. |
|
Yes, I like the sound of that. There may be a slight issue with greetings between special AI types, though. For example, there are no question/comments in the civilian to nobleman greeting, just a "Greetings your Lordship." Ugh. There's so many moving parts to this one I'm having trouble wrapping my head around it. |
|
I looked at the task of separating out the "hello" greetings. It's huge. There are 25 different "snd_*" definitions that are used to greet someone, and each of those can exist in all the different AI we have. As you mentioned, some collections consist entirely of "hello" variations, so there'd be nothing left for "non-hello". So I think I'll retract my suggestion of splitting "hello" barks into their own collections. I'll implement a few of my other suggestions and see how it looks. |
|
What the 1.08 code does: A. If Tom met Bill, Tom would assess his chances for greeting. 30% chance of success. If this failed, Tom wouldn’t try again with Bill for another 20 seconds. If Bill was gone at that point, no greeting would occur. B. Once Tom got past the “chance” check, the GreetingBarkTask() would see if 3 minutes had gone by since the last time Tom greeted Bill. If so, the greeting was allowed. If not, the greeting was denied. C. If a greeting occurs, Tom greets Bill, then sends him a message so he knows to return the greeting. Bill then acts like he’s the initiator, barking his reply and sending Tom a return message. Tom gets this message and tries to bark a reply to Bill, but the code prevents this from happening. D. For Tom to greet Bill, Tom and Bill each need the other’s eye position to be w/in their FOV. This means only AI who are facing each other are allowed to exchange a greeting. Problems with these rules: 1. If Tom and Bill are placed sitting at a table at spawn time, and don’t have any reason to get up, they will greet each other on average every 4 minutes, ad nauseum. This sounds silly after the first exchange. 2. If Tom meets Bill and at least one is moving, they probably only get one shot to exchange greetings. 70% of the time, this will fail. So the effect is two AI who might not have seen each other before, or who haven’t seen each other for a long time, don’t say anything to each other. An observer might expect them to greet each other. 3. In 2.0, if the player is friendly with or neutral to Tom, and encounters Tom, Tom is allowed to greet him. Following the rules A & B, if the player stands near a table full of Toms, the odds are high that he will be continuously greeted. 4. For Rule C, there’s no reason Bill has to act like he’s an initiator. He should just bark his reply and end the exchange. The return message back to Tom and having Tom discover he shouldn’t process it is a waste of cpu time. 5. If Tom comes up from behind Bill, then continues past him, no exchange will occur, because of rule D. In real life, Tom might very well say something to Bill as he approaches. Fixes: 1. Don’t let seated AI greet each other. 2. Eliminate the “30% chance” check. Replace it and the 3 minute waiting period with a random waiting period between 8 and 12 minutes. This reduces the frequency of exchanges between the same AI, or an AI and the player, and guarantees that when an exchange can happen, it happens, and isn’t subject to chance. 3. Mark the greeting and the response differently, so GreetingBarkTask() doesn’t get run excessively. 4. Tom can greet Bill if Bill is in Tom’s FOV, regardless of whether Tom is in Bill’s FOV. Bill responds even though he can’t see Tom. Since the AI look at who’s talking to them, this has the effect of Bill looking over his shoulder at Tom as Bill responds. Rev. 5798: State.cpp GreetingBarkTask.cpp GreetingBarkTask.h Memory.cpp Memory.h AI.cpp Tested with Dragon’s Claw, In the North, and a few other missions. |
|
Are AI waiting for the player to be within earshot? If not, 8-12 minutes sounds a bit long. I would expect the player to move through an area in less time than that, so if the greeting happens just before he gets there, he's not likely to hear it before he's gone. The other things sound good. How does the code decide who initiates the greeting if both AI are in each other's POV? |
|
AI are not waiting for the player to show up. That caused a slew of greetings to be queued up and executed when the player shows up. The initial greeting is random, somewhere between 0 and 8 minutes. (I failed to mention that.) Regardless of what the delay is between greetings, there's always the case that a greeting occurs just before or just after the player is there. However, greetings depend on 2 AI and the player being in the same place at the same time, and the player is more likely to hear a greeting with the new code than with the old, as long as at least one of the AI's inter-greeting delay has expired. We could reduce 8-12 to be less, but the closer we get to 3, the more we'll experience the previous bad behavior. Between AI, the AI that gets stimmed by another AI is the greeter. The other AI is the responder. Now, the other AI may also be getting stimmed by the first AI at roughly the same time, but if the other AI has already been tagged as a responder, he won't initiate his own greeting. |
|
@SH: Rev 13488 includes a Windows DLL with these changes. Please keep an ear out for greeting frequency and circumstances. If you want to reduce the delay, I can bring it down midway between old and new, perhaps a random time between 5 and 9 minutes. |
|
After testing this for a while, I can report that I'm not hearing greetings very frequently at all...about the same as it was in previous releases, actually. Sometimes I'll go the whole mission without hearing one. Recommend reducing the delay. Also, I'm going to try and reduce the number of times AI use the "hello" lines when greeting. |
|
I reduced the delay from 8-12 min to 4-7 min. Try that. |
|
After testing it for a while it seems pretty good to me. I'll mark this resolved. | |
Date Modified | Username | Field | Change |
---|---|---|---|
14.05.2013 20:06 | tels | New Issue | |
14.05.2013 23:46 | grayman | Note Added: 0005461 | |
14.05.2013 23:46 | grayman | Assigned To | => grayman |
14.05.2013 23:46 | grayman | Status | new => assigned |
14.05.2013 23:59 | Springheel | Note Added: 0005463 | |
15.05.2013 00:21 | grayman | Note Added: 0005464 | |
15.05.2013 14:46 | grayman | Note Added: 0005472 | |
15.05.2013 14:47 | grayman | Note Edited: 0005472 | |
15.05.2013 14:52 | grayman | Note Added: 0005473 | |
17.05.2013 13:47 | grayman | Note Added: 0005476 | |
17.05.2013 19:50 | Springheel | Note Added: 0005478 | |
17.05.2013 19:51 | Springheel | Note Edited: 0005478 | |
17.05.2013 20:12 | grayman | Note Added: 0005479 | |
17.05.2013 20:12 | grayman | Note Edited: 0005479 | |
17.05.2013 21:31 | Springheel | Note Added: 0005481 | |
19.05.2013 18:47 | grayman | Note Added: 0005486 | |
21.05.2013 23:06 | grayman | Note Added: 0005488 | |
21.05.2013 23:06 | grayman | Status | assigned => resolved |
21.05.2013 23:06 | grayman | Resolution | open => fixed |
21.05.2013 23:06 | grayman | Product Version | => TDM 1.08 |
21.05.2013 23:06 | grayman | Fixed in Version | => TDM 2.00 |
21.05.2013 23:06 | grayman | Target Version | => TDM 2.00 |
21.05.2013 23:26 | Springheel | Note Added: 0005489 | |
21.05.2013 23:26 | Springheel | Note Edited: 0005489 | |
21.05.2013 23:33 | grayman | Note Added: 0005490 | |
21.05.2013 23:41 | grayman | Note Edited: 0005490 | |
22.05.2013 22:12 | grayman | Note Added: 0005493 | |
22.05.2013 22:12 | grayman | Note Edited: 0005493 | |
08.06.2013 21:17 | Springheel | Note Added: 0005543 | |
08.06.2013 21:17 | Springheel | Status | resolved => feedback |
08.06.2013 21:17 | Springheel | Resolution | fixed => reopened |
09.06.2013 00:39 | grayman | Note Added: 0005544 | |
04.07.2013 02:19 | Springheel | Note Added: 0005633 | |
04.07.2013 02:20 | Springheel | Status | feedback => resolved |
04.07.2013 02:20 | Springheel | Resolution | reopened => fixed |