User:Wilkens Exavier/sandbox

Finite State Machine Algorhithm
As artificial intelligence continued to develop throughout the years, another style of its development came in the form of the Finite State Machine (FSM). Seen in use in the classic game, Wolfenstein 3D, this allows AI within the game to make choices based on a form of actions that happen upon them based on what the player does. The player directly influences what the AI will do next dependent upon their encounter. An AI will essentially wander until they player is encountered, to which, they will attack. If the player fights back, the AI will evade in order to not lose health points.

If the player evades the attack and is out of sight, the AI will revert back to wandering until the player is found again. If the situation where the player is on the offensive and the AI is in a threatened situation, it will evade, and only return to wandering after it has regained a significant amount of health points back. However, this alogorhithm isn't applicable to every style of gaming. FSM wouldn't be useful in a strategy game since the AI's moves would be easily predictable to the player.

The Monte Carlo Tree Search Method
Artificial intelligence in video games initially started out with two components that made up their behaviors, pathfinding and finite state machines. In pathfinding, it's how the AI can get from point A to point B in the most direct way possible, whereas finite state machines can move between different states at a given moment in time. While this has been the common components to the behavior of video game AI's for the past several decades, development in AI decision making and behavior had gone from simple to complex with the development of the Monte Carlo tree search method. The MCTS method provides a more complex decision making and behavior process that video game AI's undergo to provide a more a complex way of engaging the human player. The AI will now come up with more ways to create more obstacles for the human player to overcome in order to progress. The MCTS consists of a tree diagram in which the AI essentially plays tic-tac-toe to which, depending on the outcome, will follow a select pathway in order to come to the next obstacle for the player, or the next tic-tac-toe board. The tree, specifically in video games that are more complex, contain more branches and possibilities are numerous, providing the player to come up with several strategies to figure out how they can surpass the obstacle and move on to the next level of the game.

The Monte Carlo tree search method consists of four phases:


 * 1) The information that exists within the nodes follow each node down to the end of the search tree.
 * 2) The search tree creates a new node.
 * 3) A simulation occurs in which a winner is determined.
 * 4) The nodes that follow the selected path are updated with new information from the simulation.

This process repeats throughout the process of the game in order to determine each and every possible outcome in an obstacle. Each node can create several paths, both similar and different, in order to provide the AI with several different ways in order to engage the player and create an immersive experience within the game. This method not only involves creating new paths, but also justifying which paths are the right paths to take. The end all purpose is to create new paths, but also exploiting proven paths that end positively for the player. The method of MCTS is combined with Upper Confidence Bound 1, or UCB1, to create an Upper Confidence Bound 1applied to trees, called UCT. The process algorithm adds the exploitation term (wᵢ / sᵢ) to the exploration term, (sqrt(ln sₚ / sᵢ) that results in the UCT, which determines the selection for the best possible path of nodes that the AI can anticipate. The numbers that i represents in the exploitation term represents the the number of situation that ended in a win added to the total number of simulations.

Two Tier AI Systems
With video games having more advanced, developed AI programs, the time also comes in which their decision making also makes significant changes. In the 2014 survival horror game, Alien: Isolation, the premise of the game pits the player against the titular antagonist, the Alien, otherwise known as LV-426, in which the player can either distract, evade, or escape the creature in order to complete the game. In turn, the Alien can kill the player rather easily, within a single hit. However, this process is difficult to accomplish, considering the AI is stronger, faster, and more dangerous than that of the player. The developers of the Alien: Isolation utilized the strengths of the AI to not overcome the player, but challenge the player to outsmart the the AI. In the game, the player must use stealth in order to evade capture or death at the hands of the Alien. The player's most difficult task is outmaneuver the Alien, because the Alien has not set path or pattern. It learns and adapts just as much as the player does.

The game is built upon a system of two-tiers, a Macro AI, which is the Director AI system, and the Micro AI, which refers to the Alien. The Director is essentially the overall "dungeon master" of the current scene in the game and is there to keep up with both the status of the player and the AI. The Director will often provide hints to the AI on where to look for the player in so it is never completely out of the loop in its search. However, the director will never tell the Alien where the player exactly is, but will just simply create a scenario where the player must find a way to outmaneuver the Alien and avoid death. The Director never acts beyond the rules of the primary game: the player must escape the Alien to win, and the Alien must find and kill the player to succeed. In order for this to function, the game relies heavily on tension between the player and the AI. The Director AI utilizes a system known as the Menace Gauge, where the Alien's behavior would be determined by its proximity to the player. The closer the AI would get to the player, the more the behavior would become a detriment to the player, thus increasing the tension and forcing the player to act quickly, but intelligently. But, the Alien will not constantly be on the player's back. If the player can avoid the Alien without catching its attention after a finite amount of time, the Alien will cease it's "active" mode and return to its "passive" mode and will leave the area the player is in, allowing them to further progress in the game's story.

While the Alien's behavior tree consists of over 100 nodes, many of the nodes will be locked initially, with more gradually being unlocked as the player progresses through the story. This gives the AI a more adaptive presence in the game, seemingly learning what the player does and how to adapt to it so the player must come up with a different strategy to circumvent the Alien's movements. However, as more nodes unlock, the AI's sensors become more alert and can track more actions of the player, such as the difference between light footsteps, and heavy ones if the player is sneaking around or running. The player must learn to utilize the environment and their own cunning to properly outsmart the Alien and escape it.

Peer Review Assignment 7 Completed
Wil peer reviewed Alexander Cook's article.