05/11/2018 - Neural networks and Q learning


A neural network is a class of general purpose tools generally applied to Prediction, classification and clustering, the most powerful of these is the human brain which makes it possible for humans to generalize from previous experience compared to their computer counterpart which a programmed to follow a set of pre-determined instructions over and over again. This is the difference between the learning process of a human and a computer.

A neural network however bridges the gap between the human brain and computers by modelling the neural connections of a brain and they start to generalize the data taken and attempts to mimic the human’s ability to learn from experience.


An incredibly common usage for neural networks outside of gaming is their use in determining house costs, they take in all available data such as living space, size of garage, age of house, garden size etc. These are all inputs which will help the Neural Network make a decision and will be input into the model, after this there will be an output which is the expected appraised value.


The same logic can be applied to video games as the same model can be applied to AI characters too as the process is incredibly similar as actions the AI can be taken into account as the inputs such as moving, attacking, searching, healing etc and they will take into account the outcome of each variable and then proceed to take action accordingly which would then be the output.



Q - Learning:
often referred to as a reinforcement learning algorithm Q Learning is a function that gradually learns from each action it takes over time and then forms an optimal course of action depending on the outcomes of previous methods used. This is a method that generally keeps on learning and gradually picks up more and more data as it continues and then applies this logic to future actions. This has positive and negative connotations a positive is that it will alter the play style making a more engaging game over time, the negative is that for it to properly take effect there is a need for multiple playthroughs for the algorithm to effectively take effect as it will keep needing more and more data.

A good example of this is used in Divinity original sin 2,  over the course of the game the AI will learn how you act and what moves and abilities you will most commonly use and start to fight against them, it will also try to separate the less armoured characters from the tanks, and if you're playing as an undead character which heals from poison damage but is hurt by regular healing then it will focus healing spells offensively on the undead character.


Fuzzy logic:
Fuzzy logic brings a new take on traditional logic, for example traditional logic will dictate you are either hurt or healthy dependant on whether you have taken damage etc. Fuzzy logic however brings a new take on the matter and brings in areas such as health percentages, so if you have taken 20% damage the game sees you as 20% hurt but 80% healthy. It's often used for assigning characteristics to NPC's and will help them decide on which actions to take for example if they drop below a certain percentage they may yield or try to run away.

Comments

Popular Posts