• Home
  • Unreal Engine
  • C++
  • Blog
  • About

Projects Blog

AI Social Deduction: Week 6

7/3/2021

0 Comments

 

Memory System and Bugfixes

In the video above, I show the new sliders, the better pause button, the new Knowledge bar controls, and the new memory system.

Memory System

The memory addition is the newest major feature to be added to the game. The general concept of it is that, every couple of seconds, each Crewmate will have a chance two forget two random pieces of memory. Forgotten memories have their text set to a red color and will not be usable in the soon-to-be-added voting discussions. Crewmates can have, at the very least, 8 memories that aren't forgotten. This prevents the system from leaving the Crewmates with no usable memories in discussions.

Also, main menu has had the "Forget Memory Chance" slider added to it as well to allow the user to specify what percent chance the Crewmate will lose 2 memories every 2 seconds. If I have bonus time, I'd like to be able to update the sliders page to allow the spectator to specify the memory loss chance, the number of memories lost, and the delay between memory loss checks.

Bugfixes/Polish

As was mentioned in the last update, I had three areas of concern when it came to bugs and polish. Here are the three issues I tackled and the solutions I came up with to solve them:
  • The Crewmates weren't able to see through each other. - This was being caused by the fact that the AIPerception component's sight sense was dependent on an object's "Visibility" collision channel. All of the Crewmates were set to Block on their mesh and their capsule component. This was stopping the Crewmate's line of sight at the first object in front of them. To correct this, I instead set all of their components to be Overlap collision on their capsule component and ignore on all other components. Now, the crewmates are able to see through each other while also still being able to register each other. However, this caused a problem with the ability to click on Crewmates, which I will discuss in the next bullet point.
Picture
Green is able to see past all of the Crewmates standing in front of him so he is now able to register Blue, Turquoise, Red, and Gray even though Blue is directly in front of his line of sight.
  • The clicking on Crewmates only sometimes works. - Similar to the AIPerception's vision sense, the mouse over and on click events in Unreal depend on the Visibility collision channel. Setting all Crewmates' components to ignore except for the capsule being set to Block fixed this issue so that mouse events would work correctly on the Crewmates at all times. However, the Block on the capsule component caused the issue of the Crewmates not being able to see through each other. I decided it was more important for the Crewmates to have the correct vision capabilities, so I changed the Knowledge bar's controls to be keyboard-based. Now, the Spectator can hit R to show/hide the Knowledge bar. Q and E are used to show the previous and next Crewmate's knowledge, respectively. Mouse controls have been removed. These controls aren't as quick and easy to use, but it's an acceptable change.
  • The pause button needs to stop Crewmate movement and task progression. - The pause button now sets every Crewmate's walking speed to zero to make certain they stop in their tracks. It also prevents the progress bars above the Crewmates' heads from filling up, now. This makes it so that all Crewmate activity stops while leaving the spectator the ability to continue flying around and check each Crewmate's knowledge. Pausing the simulation also stops the Memory system to prevent a bug with Crewmates forgetting Knowledge while being paused. 

Crewmate Dead Bodies​

Picture
I was also able to implement a dead body drop for whenever Innocents are killed. The gravestones act at the representation of a Crewmate's dead body in the simulation. Currently, these dead bodies hold the last Crewmate Information state that the Innocent had, which is how the dead bodies record who was killed and what room they were killed in. Crewmates are currently able to see these dead bodies on the ground and are able to send up a print message stating whose dead body they found. This function will be updated to begin the Voting Discussions scene in the next update.

What's Next?

Next week marks the second half of the Crewmate's reasoning and understanding: learning through Dialogue. To accomplish this next part of the system, I will be working on:
  • Creating the discussions scene where Crewmates will enter this upon finding a dead body and then will proceed to talk through who was last in the area of the dead body.
  • This Dialogue scene and learning system will take up most of the time this next week, but if I find myself with some free time after it, I will also work on updating the visuals of the menus and the ship itself. I really want to finally get around to updating the art and design of these to make the simulation also look better than a whitebox.

Want to Download the Project?


​Click Here:

Github Repository
0 Comments



Leave a Reply.

    Coleman Levy

    Welcome to my blog! 

    Archives

    August 2021
    July 2021
    June 2021
    May 2021

    Project

    All
    AI Social Deduction

    RSS Feed

  • Home
  • Unreal Engine
  • C++
  • Blog
  • About