Saturday, 9 April 2016

AI Design for game and simulation environment


I have a long history in AI development, but my goal has always been to design and develop life-like AI. I see classic state machines as semi-AI, not really AI, but as a kind of a control logic. As processing power of computers and mobile devices has increased, it is now possible to program an AI which gives an impression of natural  behaviour, even on mobile platform.




This AI is designed to mimic real, unpredictable behaviour of intelligent, semi-intelligent and non-intelligent beings. It is based on ideas from fuzzy and non-linear systems, which have certain rules and causalities but some degree of randomness, also. It is not totally deterministic, but not totally random, either. It should be emphasised that this is not a state machine.



As designed, this AI develops independent behaviour patterns in a node based associative and constructive memory. Nodes represent concepts, locations, actions and objects using a simple semantic language. Based on experience and training an AI entity will generate these nodes and link them to other nodes. During this process it will evaluate these nodes according to outcome of real events. Thus, it can separate e.g. actions or objects which are harmful, and avoid them in the future, or it can assess them as beneficial.



It is possible to evolve very complex behaviour patterns with deeply linked memory nodes, where low level concepts are combined and constructed into larger concepts. Some of these nodes represent basic instinctive behaviour, but entity will gain more experience or training later on. In any situation, an AI entity will evaluate possible actions according to what objects, entities etc. are present, what kind of environment it is in, what are its present goals, mood, physical and mental condition and physical needs using the concepts it has stored in its memory and whether they lead to beneficial or harmful outcome.



An AI entity can learn and change its behaviour by changing previously evaluated and assessed things and their parameter values. This makes it possible to adapt changing environment and situation, or to learn by training, where another entity gives positive and negative feedback. Basically, an AI entity can learn by trial and error.



Part of this AI is a communication system. An entity can express itself using rudimentary language. Depending on entity this communication may use vocal expressions, visual signals, smell or other senses. Any AI entity is capable to understand its environment - not only objects, but also these signals, and respond accordingly.


This AI framework has modular design and it is possible to customize it for various scenarios where natural, unpredictable behaviour is needed to simulate lifelike entities. In this case it has been adapted to represent dog behaviour, which is interesting since it has to be balanced between strong instinctive behaviour and conditioned training.