Attention Officers, Welcome to the 50th edition of our biweekly newsletter! To mark this milestone we will be having an extra-long newsletter, we’ll be featuring a meaty write-up of the AI system that Ready or Not uses as well as a good public look at the other half of the Station Rework Starting off with the rework of Station, being the first map that many if not all players will see meaning it’s an incredibly important first impression, perhaps even more so since the atmosphere of the Station and the decrepit state of the players surroundings reflects the state of Los Suenos as a whole. With the combination of clearly repurposed rooms, crumbling architecture, all filled with high tech police equipment in stark contrast of their surroundings it effectively communicates the state of the world the player has chosen to immerse themselves in. [hr][/hr] [h2][b]The Station Reborn[/b][/h2] Along with many the facelifts that many of the legacy maps are getting, we had no intention to leave our players' home base in the dirt. Teasing the level of detail we plan to put into the rest of the station with part 1 of the revamp we launched with Adam, we figured it was time to tease the rest of the work we’ve put into the map. [img]https://clan.cloudflare.steamstatic.com/images//36750080/5ea70b4a578c22edf95843ac3b7ae0333af1fcb8.png[/img] [i]Above: The shooting range receives a bit of a facelift, replacing the claustrophobic stalls with a much more open-form design.[/i] [img]https://clan.cloudflare.steamstatic.com/images//36750080/e45a08badbcf7a6d55565ca557ddd5fc19e2dc64.png[/img] [i]Above: The station's surveillance and information gathering suites often cast a wide net. With the LSPD on the backfoot, they need all the help they can get. Make sure to visit Dispatch once in a while.[/i] In the future, many locations within the station will have more nooks and crannies to explore and perhaps even easter eggs to find. Many will be like the well known hats and the coffee machine, some will have more effect on you, your officers, and maybe even your gameplay. [img]https://clan.cloudflare.steamstatic.com/images//36750080/db31adf7565388b6befbffa3d85c4460e386123d.png[/img] [i]Above: The Evidence room, where you can find some of your confiscated arms, drugs, and [b][REDACTED][/b].[/i] [img]https://clan.cloudflare.steamstatic.com/images//36750080/b9ed1706cf0f8b0d1d3750181b8e673e1b58822d.png[/img] [i]Above: A relatively calm moment in the lobby of the LSPD station, enjoy them while you can.[/i] [hr][/hr] [h2][b]A Lesson on RONs AI with Ali[/b][/h2] By popular request, one of the most influential voices in the programming of Ready or Nots’ AI, Ali, has given us a writeup on exactly how the games AI functions and makes decisions based on environmental factors. The AI system we use for them is what is called a Utility-Based AI System. A decision making model. The concept behind Utility AI is to mathematically model human behavior in a computer program using numbers, formulas and response curves. The “human” we want to model is called an agent or simply, an AI. Each agent in a world environment has a list of Decisions (or what we call, Actions) they want to make. Every frame we run through the list of actions and decide which one to pick and execute. That’s the core AI loop. Inside each action, there is a list of Considerations that make up what an action is mathematically, and is what ultimately determines the score for that action. Each consideration outputs a score, which all then get accumulated (using a scoring method) at the end to output a final score for that action, that will then be later used to pick the highest scoring action. That action will be the one to execute and run (using another system called the Activity System), with a commitment time set, so they don’t oscillate in their decision making, acting indecisive from frame-to-frame. There is also a thing called Commit Interrupts, it is a list of names of actions that can interrupt the current action if it is being committed to, and they get evaluated every frame too. Gives us more control. The scoring method is just a list of 4 math operations, Additive, Subtractive, Multiplicative and Divisive. Really simple, they just add, subtract, multiply or divide into a score accumulator. It serves as another setting that designers can tweak to mold the final action score. One example of what a consideration can be is “Health”. This is scored using a [b]Scoring Function[/b] that we define, that scoring function takes in a world context and outputs a number. In this case, “Health”, it is really simple, we do Current/Max, which gives you a value (or in other words a score) from a sliding scale between 0.0 to 1.0, which then can be optionally scaled by a [b]Weight [/b]to bias the action in the AI if we want. You can imagine other considerations having more complicated functions. The output of the scoring function is then mapped by the response curve and is used as the final score of the consideration. There are many curve presets to choose from, the default is a Linear response, but you can have all sorts of easing curves, like Exponential, Sinusoidal, etc. (or even a hand made curve, or even better, we have the ability to implement your own custom curve function, which is pretty neat.) A health of 0.9, ([b]altered by the shape of a curve[/b]) can be a good or bad thing. Good being you probably don’t need to take cover and you can risk taking certain actions. Bad thing if you want your health to always stay full, so you find cover and regenerate using a stim (this doesn’t happen in RON of course, but just as an example of how looking at the same number can mean two different things). [img]https://clan.cloudflare.steamstatic.com/images//36750080/b2aba7d58d2a52e93bd316489a8e433249468d67.png[/img] As you can imagine with a library of hundreds of considerations, using those and tweaking response curves is how we can get different “personality types” or behavior's out of our suspects and civilians, some being more resistant to surrender than others or some being more eager to take cover or some that can be more suicidal if you don’t de-escalate the situation quickly. [img]https://clan.cloudflare.steamstatic.com/images//36750080/8111bd831e10a51a91f2a076fbb4d5599d1fc4d9.png[/img] [img]https://clan.cloudflare.steamstatic.com/images//36750080/a7eecc068d6e76d60df02b95d0068ff2f01182b7.png[/img] We have another concept in our system that I don’t think I’ve seen anywhere in other people’s utility implementations but it’s hardly anything groundbreaking. We call it Gates. It acts as a supplementary aid to Considerations. Gates are similar to considerations but instead of returning a score, they just return true or false, open or closed. The purpose of gates is to block off actions that we don’t want the AI to consider. All gates must be open for the action to be considered for scoring. Cooldown timers are one example where gates are useful, there is no way you can reasonably do this with considerations and weights, it needs to be a binary operation. Has the cooldown finished or not? The cooldown must be finished before considering said action. Before when we didn’t have this concept, we would sometimes have AI surrender to no stimulus or do certain actions that they shouldn’t have been doing, and when you went to debug what was going on, all the scores seemed reasonable and you could see why they did a certain thing. Gates help us control them a little more so as to not go wild and do un-expected things, which our designers like. [img]https://clan.cloudflare.steamstatic.com/images//36750080/b1f2dc4c7f062fe5d6059d5d45e707bca27d04a6.png[/img] The simple concept of using math and formulas to mold the output result to your liking (using weights, different scoring methods and response curves), gives you a whole bunch of states that you can’t possibly program into the AI manually, which in turn greatly affects the gameplay experience, each AI will behave slightly different than the next. Our previous version of the AI system was basically one large state machine at its core and can only ever be worked on by us, the programmers. If we wanted to progress, implement better AI, allow for designer freedom to alter AI behavior quickly in the editor, without asking programming to do simple things, a radical approach was needed to switch to Utility (which took about 6 months to implement). However, we still use the state-machine concept for concrete actions like, moving to and picking up a weapon on the floor or breaching a door (which has a lot of states). But the decision making aspect of the AI, the brains if you will, is all Utility-Based, we don’t have to manually say “if this then that, if this then do x”, instead, as outlined above, we give them a set of actions and rules to follow, then they can go about into the world and make decisions for themselves which is pretty neat and what feels like “true” AI. All we have to do on our side in the editor is setup their Archetype (the definition/personality of an AI), which houses the actions we want them to make. After we’re done, we assign the archetype to the specific AI in our data tables. We have about 50 archetypes and many AI variants in a level share a similar or the same archetypes, for many reasons, for simplicity sake, we don’t want to duplicate archetypes unnecessarily when we can just reuse the ones that work, or if we happen to take a liking to a particular archetype in the way they behave, etc., plus the overhead of our team in managing all those archetypes, it’s something we try to stay lean with. [hr][/hr] [b]Conclusion[/b] This concludes our 50th briefing. Be sure to tune in next time for more development news! If you’d like to help us test new content during playtesting periods on the Supporter exclusive experimental branch, provide us with your game feedback, and keep up with the Supporter community; you can become a supporter at www.voidinteractive.net or at our Steam store page. Are you a content creator on youtube or twitch looking for new games? We got you covered; Ready or Not has partnered with Lurkit to elevate gameplay! Make sure to follow us here. Make sure you follow Ready or Not on Steam here. Keep your feet on the ground. VOID Interactive