Murder Mansion

by SuperSaiyanGokuX
Murder Mansion
Not for the faint of heart...
ID:1335059
 
And, one last update preview post, to cover what I consider to be the most important aspect of the update.

This is the area of the game that I spent the most time improving, and I really hope it will show. And if you've been keeping score (either by process of elimination of the other things I've mentioned, or if you've noticed a hint here or there), then maybe you've already guessed what this post will be about.

Murder Mansion AI Upgrades

That's right. One of my main focus points with the work I've put into this update is in upgrading the AI.

At various versions since I introduced them, the bots have ranged from (at best) sufficient to complete a round to (at worst) unable to do much of anything (getting stuck or hung-up in their routines) I'm not even sure where on this spectrum the currently released version of the AI falls. But no matter what their level of capability, they've been boring, probably predictable, and not very fun to play with.

Hopefully, I've solved those problems, along with making the AI a little more "human".

Here's a run-down:

1) The AI are now capable of competently playing the game in any role in any mode (except the new Werewolf mode, which is the last thing I'm working on) I've run countless test rounds played by full-AI players (including my own character on autopilot/AFK mode), and they have arrived at every possible win (or lose) condition.

For instance, in Classic, I've seen the murderer win, I've seen a bot correctly accuse the murderer, I've even seen rounds end by accidental death (or DQ by incorrect accusations; the bots have a human-like deduction system of levels of suspicion that increase or decrease based on what they see; well, sometimes, they get it wrong!)

Yes, they're now very capable of killing, and very capable of deducing the killer based on clues (or by flat out witnessing attacks)

2) They use much more of the functions on the maps. They'll go reset the power or phones if they've been turned off (and the murderer will set a "trap" by turning off the power and waiting around for someone to come turn it on), the murderer will also now utilize methods to clean up after a kill (the AI now automatically wash their hands when they use the bathroom so killers will sometimes go into a bathroom right after making a kill, murderers will take steps to clean or dispose of/hide a used weapon, etc.)

Their behavior is now also much more robust, with all kinds of prob() checks used on all kinds of possible actions (a bot witnessing an attack might choose to run for the phone, or they might choose to play vigilante, a murderer may choose to launch an attack with their bare fists, or to wait until they've armed themselves, a murderer may choose to attack someone only when they're the only player in sight, or perhaps even go after someone with a witness around (the witness will go on the list to be killed next, of course!))

3) They're also now much more social. They have a dialogue file that has lists of speech and emotes organized by the situation. They have greetings and introductions based on the current mode, some small talk stuff based on the current map, some output to talk about their intentions ("Where's the food around here? I'm starving!", "It's too dangerous to walk around without some kind of defense. I'm looking for a weapon.", etc.), responses to being attacked or witnessing an attack, threats if they're about to make an attack, etc.

They even have some generic responses so they'll respond to what they "hear". ("That's a good idea!", "I'm not so sure...", "Whatever makes you happy!", etc.) Right now, there's not a whole lot of variation (an average of 6 or 7 messages that they'll pick from in each category), but that will improve in future updates as I add more variety.

Even better is that they also have a method of reporting on what they've seen/experienced. Certain objects and events will set an output message that they'll relay to anyone they see from then on ("Did you see that Blood in the Kitchen?", "I just saw [name] carrying a used knife...", "There's a Body in the Garage!")

I'll revise the dialogue file with future updates to add more variety. I'll probably even ask for player submitted dialogue for me to add. Also, the dialogue is stored in a textfile in an included directory, which I believe can actually be opened and edited by the players who download the game, so you guys could even write your own scripts!

4) Their pathing has been improved in that they now favor targets that are closer to them (especially good in terms of finding stairs; before, a bot might walk all the way across the map to go upstairs, when a stairway was right next to where they started)

5) They'll pick up objects on the ground (especially useful if they stumble and drop something, or if they're looking to get a weapon, and happen to find one lying along their path)

6) I got tired of how they all took steps on the same tick, like they're marching or something (a byproduct of them all taking a step based on a game control loop), so now they've been given individual delays and such to make them more staggered.

-----------------

I've done so much to these bots, that I'm not sure I remember it all. I sure hope that they'll now be much more entertaining to play against. My only current fear with them is that they're still a little slow. A human player walking around can move much faster than the bots (who are instructed to take steps as part of a game control loop, that even at one loop per tick still doesn't make them walk as fast as a human)

They're still capable of getting the drop on you, but they'll probably be no match for a skilled player.

We'll see how the community feels about their new level of ability/challenge. I may need to give them a further boost. But maybe not!
I saved a couple of chatlogs that I thought were especially cool examples of the new AI abilities and socialization. Please see the following document:

http://files.byondhome.com/SuperSaiyanGokuX/ awesomeAIdialogue.doc

(I was going to just copy-paste the text here, but that would ruin the formatting, and since the text output formatting has also been tweaked as part of the update, I wanted you all to see that, too. Oh yeah, please note that the text output in the game is double-spaced; I removed the extra blank lines from this document to trim it down. Also, obviously, in-game the text background is black, with colored or white text.)
I like it nice job.
In response to SuperSaiyanGokuX
SuperSaiyanGokuX wrote:
I saved a couple of chatlogs that I thought were especially cool examples of the new AI abilities and socialization. Please see the following document:



Sir I'm afraid I don't speak robot.
Awww. Damn LibreOffice.

How's this one work?

http://files.byondhome.com/SuperSaiyanGokuX/ awesomeAIdialogue.docx

And if all else fails, here it is in straight .txt format, but that loses all formatting (text color, size, etc.)

http://files.byondhome.com/SuperSaiyanGokuX/ awesomeAIdialogue.txt

Are you going to fix ladies having Facial hair though? Just asking. I feel it kind of breaks immersion though.
Also where can we find a guide to adding dialogue and the context for it?
There's also a bug when I shoot someone with a Revolver I have bloody hands. I don't know if that was intentional but it really makes no sense...
In response to CodeWeasel22
CodeWeasel22 wrote:
Are you going to fix ladies having Facial hair though? Just asking. I feel it kind of breaks immersion though.

I don't know. Like my note in the chatlog file says, it was unintentional, but I find it to be kind of funny (and heck, some women, and some "women", do have facial hair! lol). It doesn't happen all of the time, so I'm not sure it's a real issue.

The distinguishing traits system is very simple. It just pick()s a random number of items from a list of different features (among them, facial hair), and the same list is picked from for all players, regardless of gender (so sometimes, a female might be unlucky, and have some facial hair applied)

I could fix it, of course, by simply breaking the distinguishing traits selection up by gender, and removing the facial hair options from the female list, but again, it amused me, and I didn't think it a big enough problem to bother with.

We'll see.

CodeWeasel22 wrote:
Also where can we find a guide to adding dialogue and the context for it?

I'm terrible with documentation. I haven't yet made a guide. However, it should be a fairly straight-forward process once you find the file (located in a sub-folder titled "Text_Files" in the Murder Mansion download files; the currently available game already uses a system.txt file that contains all large game texts (map descriptions, mode descriptions, round-end text, rules, etc.), and the new version will be adding a dialogue.txt file in addition to that one)

It's broken up by category:

<CLASSIC>
<CLASSIC INTRODUCTIONS>[list of sentences here, separated by asterisks (*)]</CLASSIC INTRODUCTIONS>
<CLASSIC GREETINGS>[same as above]</CLASSIC GREETINGS>
etc.

So figuring out which category is used for which situation in the game should be pretty easy (the above example might be a bit ambiguous, but the difference between introductions and greetings is that the introduction is only displayed at the beginning of a round, when everyone's all together for the first time; then from then on, whenever players run into each other again, it displays a greeting). Then it's just a matter of adding/replacing the text with whatever (again, separated by asterisks), and saving the file.

I don't know if I mentioned it, but bots will not constantly jabber. there are plenty of prob() checks thrown in to keep them from constantly talking. They'll remain silent some of the time. (however, there's also a subscriber-only option that can adjust their talkativeness; from completely silent, to the default probability, to talking/responding 100% of the time)

CodeWeasel22 wrote:
There's also a bug when I shoot someone with a Revolver I have bloody hands. I don't know if that was intentional but it really makes no sense...

That is a bug, though it's purpose is sort of necessary. It's to mark the attacker as having made an attack. Though you're right that it doesn't make sense. In the case of guns, I could add a second status, like "gunshot residue" or whatnot, I suppose.

And now that you've brought it up, I'd bet that other ranged weapons also leave the attacker's hands bloody (like a thrown rock, or the darts, or the arrows, etc.) I guess I'll look into this...
I appreciate you listening. You could always leave an option for Facial hair women, they do exist in real life though. Not very common however, as for text files I ask as I'm eager to do so. Was wondering if they'd have generated personalities, if so I could help write some.

As for the Gun, you could add they smell odd, as smoke from shots smells rather odd. Certainly distinguishable if your familiar with it. Also perhaps only have one or two revolvers per map, but you can reload bullets otherwise it's a huge potential for exploit.
I've also started on some stuff

<CLASSIC INTRODUCTIONS>
Hallo*
Some weather, Huh?*
Hope I don't catch a Cold...*
Where's a Board game?*
Find any good Books?*
It's going to be a long night...*
Hope the storm lets up soon...*
If I only had my Umbrella...*
How long have you been here?*
The rain is quite calming.*
</CLASSIC INTRODUCTIONS>
When is update coming? You said around the end of the month, if I remember right?
Yep. Since July is MM's "birth" month (technically, development started in April of 2003, but the hub entry and first upload went up in July of that year), I've given myself the absolute deadline of the end of this month to release it.

I was hoping to hit the exact anniversary date, but that passed on the 23rd.

So, no matter what (well, unless it involves some kind of medical emergency), I will be releasing the update before the 1st of August.

The good news? As of a little earlier tonight, I think my last major hurdle has been overcome! The AI are now successfully competing in and completing the Werewolf mode.

But now I've still got to clean up all of the debug output, make the Werewolf AI a little more sophisticated (I've been struggling just to get them to do the bare minimum for the round, so now that that's worked out, they still need a bit more finesse)

And there's one last quick idea that popped into my head today.

And if I've still got time, I've got a list of extra touches and possible additions that I had pushed off (but no worries there, they'll probably make their way in eventually)
In response to CodeWeasel22
CodeWeasel22 wrote:
I appreciate you listening. You could always leave an option for Facial hair women, they do exist in real life though. Not very common however, as for text files I ask as I'm eager to do so. Was wondering if they'd have generated personalities, if so I could help write some.

My original design plans for the AI included a handful of personality types, either fully scripted or handled through a set of variables for various personality traits. But I pared that plan down. I still want to get them to that point eventually, though.
Awesome. :) Like my dialogue perchance?
In response to CodeWeasel22
CodeWeasel22 wrote:
Awesome. :) Like my dialogue perchance?

I do. In fact, some of the dialogue in my file is very similar to some of those...lol
Shall I keep writing then?
Sure!

In fact, here's a copy of the current dialogue file.

http://files.byondhome.com/SuperSaiyanGokuX/dialogue.txt

Feel free to come up with extra stuff for any of those categories, and submit back to me.

That goes for anyone reading this that wishes to do so, too.

No guarantees that I'll use everything I get, of course (and I may edit the stuff that I do use), but the more, the merrier! Can't give these bots too much variety.
Gladly! I'm something of a fan, if you couldn't tell. One of my favorite BYOND games and one that definitely defines it in my opinion.
ARE YOU ADDING ZOMBIES!?
Page: 1 2