Overview Artificial Intelligence (AI) A brief introduction to the field. Won t go too heavily into the theory. Will focus on case studies of the application of AI to business. AI and robotics are closely linked more on this next week. David Gamez IUA Week 7 Autumn 2007 1 David Gamez IUA Week 7 Autumn 2007 2 What is AI? Attempt to build and understand intelligent entities. Want computers and robots that can solve complex problems for themselves. One of the dreams of AI has been to build systems that are more intelligent than humans. However, progress has been very slow! What is AI? Name was coined in 1956 at a two month workshop in Dartmouth attended by major people in the field. Early work on symbolic reasoning, searching, formal representations. Hit major limitations. More recently machine learning and biologically inspired approaches have become popular. David Gamez IUA Week 7 Autumn 2007 3 David Gamez IUA Week 7 Autumn 2007 4 GOFAI GOFAI Stands for Good Old Fashioned Artificial Intelligence. Knowledge is represented symbolically and the system attempts to reason using the symbolic knowledge. For example, a variety of different formal logics have been used in GOFAI. David Gamez IUA Week 7 Autumn 2007 5 David Gamez IUA Week 7 Autumn 2007 6 1
Logic Formal way of representing the state of the world and reasoning about it. Logic programming systems, such as Prolog, compute the consequences of the axioms and rules in order to answer a query. Logic Example A Stagirite teacher of a Macedonian conqueror of the world is a disciple and an opponent of a philosopher admired by Church Fathers. ( x)( y)( z)(isstagirite(x) /\ teaches(x,y) ismacedonian(y) /\ conquerstheworld(y) isdiscipleof(y,z) /\ isopponentof(y,z) /\ isadmiredbychurchfathers(z) ). David Gamez IUA Week 7 Autumn 2007 7 David Gamez IUA Week 7 Autumn 2007 8 Problems with Logic Problems were soon encountered about the lack of common sense in logic-based systems. Lenat s Cyc attempted to store common sense, but now considered a failure. GOFAI approaches are now largely obsolete. Agent-based Systems David Gamez IUA Week 7 Autumn 2007 9 David Gamez IUA Week 7 Autumn 2007 10 Agents Simple Agent Software entities that perceive their environment and act on it. Can be partially or completely autonomous. Agent systems contain a number of different types of agent cooperating to solve problems by passing messages to one another. Can handle problems that are difficult with conventional computing techniques. Can also be used for modelling complex scenarios. David Gamez IUA Week 7 Autumn 2007 11 David Gamez IUA Week 7 Autumn 2007 12 2
SAFEGUARD Agent System SAFEGUARD EU Safeguard project that aimed to protect the management networks of critical infrastructures, such as electricity and telecommunications networks. Defend against attacks, failures, accidents. Built an agent system with a variety of different agents. David Gamez IUA Week 7 Autumn 2007 13 David Gamez IUA Week 7 Autumn 2007 14 SAFEGUARD SAFEGUARD Agents designed to: Monitor network traffic for anomalous activity. Monitor critical computer files. Kill dangerous processes. Correlate information from other agents. Change firewall policy. Wrap the intrusion detection system. David Gamez IUA Week 7 Autumn 2007 15 David Gamez IUA Week 7 Autumn 2007 16 Artificial Neural Networks Biologically Inspired AI Loosely inspired by the brain. Number of neurons connected to each other. Each connection has a particular weight. Activity in one neuron is passed to the connected neurons. Variety of types and network architectures. David Gamez IUA Week 7 Autumn 2007 17 David Gamez IUA Week 7 Autumn 2007 18 3
Neural Networks Artificial Neural Network http://research.yale.edu/ysm/images/78.2/articles-neural-neuron.jpg http://faculty.washington.edu/chudler/color/pic1an.gif David Gamez IUA Week 7 Autumn 2007 19 David Gamez IUA Week 7 Autumn 2007 20 Artificial Neural Networks Training with Back Propagation A network is trained by exposing it to the training data and adjusting the weights so that its output is correct. After enough examples, the network can be used to classify new data. Good way of learning complex nonlinear functions. David Gamez IUA Week 7 Autumn 2007 21 David Gamez IUA Week 7 Autumn 2007 22 Spiking Neural Networks More biologically inspired and much more realistic neural model. Used to model how the brain works for example the Blue Brain project. Also starting to be used for robotics and machine learning. Artificial Ants Real ants wander randomly. When they find food they return to their colony while laying down pheromone trails. If other ants find such a path, they are likely to follow the trail, returning and reinforcing it if they find food. Over time the pheromone trail starts to evaporate, thus reducing its attractive strength. The more time it takes for an ant to travel down the path and back again, the more time the pheromones have to evaporate. David Gamez IUA Week 7 Autumn 2007 23 David Gamez IUA Week 7 Autumn 2007 24 4
Artificial Ants Artificial Ants A short path gets marched over faster, and thus the pheromone density remains high as it is laid on the path as fast as it can evaporate. Thus, when one ant finds a good (i.e. short) path from the colony to a food source, other ants are more likely to follow that path, and positive feedback eventually leads to all the ants following a single path. The idea of the ant colony algorithm is to mimic this behaviour with "simulated ants" walking around a model of the problem to be solved. David Gamez IUA Week 7 Autumn 2007 25 David Gamez IUA Week 7 Autumn 2007 26 Artificial Ants - Applications Finding the shortest path through a network. Gene analysis. Data clustering Extend the model by having ants carry pieces of data. Ant is programmed with a rule that makes it likely to drop data by similar pieces of data. Clusters are built up by the random movements of the ants. Genetic Algorithms Living systems solve problems by evolving new creatures. Mating produces millions of variations. The variations that are most successful survive to become the parents of the next generation. David Gamez IUA Week 7 Autumn 2007 27 David Gamez IUA Week 7 Autumn 2007 28 Genetic Algorithms Genetic Algorithms Work in a similar way to natural evolution. The thing that you want to evolve is encoded as a gene. The gene is used to produce organisms. The fitness of the organisms is evaluated on the specified task. The best organisms are mated by randomly combining their genes to produce new organisms. The process is repeated until the problem is solved. David Gamez IUA Week 7 Autumn 2007 29 David Gamez IUA Week 7 Autumn 2007 30 5
Genetic Algorithm Example Genetic algorithms can be used to evolve a neural network to control a toy car. The neurons and connections are encoded as a list of 1 s and 0 s. Initially a large number of random genomes are produced. Neural networks are constructed based on these random genomes. Genetic Algorithm Example Each of these networks is used to drive the toy car. The best networks are selected for the next generation. These networks are mated in pairs by randomly combining their genes, in a process called crossover. The genes may be mutated as well. New neural networks are constructed based on the new genomes and tested on the car. David Gamez IUA Week 7 Autumn 2007 31 David Gamez IUA Week 7 Autumn 2007 32 Genetic Algorithm Example Applications of Genetic Algorithms Evolving controllers. Optimizing algorithms, production processes, etc. where you have a large number of parameters. Can be used to design products, such as semiconductors and turbines. Used in genetic programming where a program is evolved for a particular function. David Gamez IUA Week 7 Autumn 2007 33 David Gamez IUA Week 7 Autumn 2007 34 Machine Learning Machine Learning Application of AI techniques to identify patterns and classify data. Learning is applied in a very restricted way to solve one particular problem no aspiration towards human-level intelligence. Uses a variety of AI techniques, such as neural networks, genetic algorithms, etc. David Gamez IUA Week 7 Autumn 2007 35 David Gamez IUA Week 7 Autumn 2007 36 6
Machine Learning Examples Identification of anomalous patterns of behaviour in security cameras. Data mining. Medical diagnosis. Face recognition Natural language processing. And many many more! Case Study: Eurobios David Gamez IUA Week 7 Autumn 2007 37 David Gamez IUA Week 7 Autumn 2007 38 Eurobios Company based in London, France and Australia (www.eurobios.com) Uses AI techniques to model different aspects of a company s workflow, risks, waste collection, etc. Sells software and solutions based on this work. Agent-based Risk Simulation Risk Simulator is a strategic agent-based simulation solution : Models internal company processes Simulates scenarios, taking into account the mapping of risks to processes, and combined impacts Analyses critical paths of risk propagation though the enterprise. Can select and replay critical scenarios. David Gamez IUA Week 7 Autumn 2007 39 David Gamez IUA Week 7 Autumn 2007 40 Agent-based Risk Simulation Agent-based Risk Simulation Identifies risks or combinations of risks that cannot be found by traditional statistical methods Quantifies risks, even without complete of data Identifies checkpoints in order to reduce risk impacts Details this model at operational level so as to master critical processes. David Gamez IUA Week 7 Autumn 2007 41 David Gamez IUA Week 7 Autumn 2007 42 7
Waste Optimizer Generates new routes to collect waste from an area. Can specify: Types of vehicle available Time, Distance and Cost Refuse, Recycling, Green waste services Variation in frequency & volume (participation) Urban, rural or mixed regions Waste Optimizer Provides analysis on how to reduce the number of rounds by reducing time taken & distances travelled. Can also optimise existing rounds whilst maximising the productivity of each vehicle. Has several budgeting capabilities to analyse the cost impact of providing new services or making changes to existing services. Probably based partly on artificial ant AI. David Gamez IUA Week 7 Autumn 2007 43 David Gamez IUA Week 7 Autumn 2007 44 Waste Optimizer Stock Market Prediction David Gamez IUA Week 7 Autumn 2007 45 David Gamez IUA Week 7 Autumn 2007 46 Stock Market Prediction In 2005 a third of all stock trades in the US were driven by automatic algorithms. AI is used to look for hidden market patterns. Prediction is key to making money on the stock market. For example there could be long term similarities in the price movements of Microsoft and IBM. When their prices diverge, investors sell the expensive stock and buy the cheap stock, betting that historical patterns will eventually push them back into synchronicity. Yamaichi Fuzzy Fund The Yamaichi Fuzzy Fund uses the so called neurofuzzy approach to make financial forecasts. It handles 65 industries and a majority of the stocks listed on Nikkei Dow and contains approximately 800 fuzzy rules in its expert system. Rules are determined monthly by a group of experts and modified by senior business analysts as necessary. The neural network is used to teach the application using historical trading data. David Gamez IUA Week 7 Autumn 2007 47 David Gamez IUA Week 7 Autumn 2007 48 8
Yamaichi Fuzzy Fund The application uses both the fuzzy expert system and the neural network to create statements like: "The trading situation today is similar to this pattern, thus we need to do this, this and this". The system was tested for two years, and its performance in terms of return and growth exceeded the Nikkei Average by over 20%. While in testing, the system recommended to "sell" 18 days before the Black Monday of 1987. The system went into commercial operations in 1988. David Gamez IUA Week 7 Autumn 2007 49 First Quadrant First Quadrant, an investment firm in Pasadena, California, relies on genetic algorithms to help it manage $5 billion worth of investments. Since 1993, when it began to use the technique for commercial systems, the programs have earned the company $25 million. David Gamez IUA Week 7 Autumn 2007 50 Games Entertainment Industry AI is used extensively in computer games. Board games, such as chess. Other characters, vehicles, spaceships etc. are controlled by AI. Neural networks can be used for: Control Threat assessment Attack or Flee Anticipation Many other AI techniques used as well. David Gamez IUA Week 7 Autumn 2007 51 David Gamez IUA Week 7 Autumn 2007 52 Emergent Behaviour in Games Black and White AI has been used to give game characters emergent behaviour. For example, the creature in Black and White can be taught: simple tasks like keeping the village store full of food and wood; a range of beneficial, benign, or violent acts: anything from what and when to eat to how to attack an enemy's villagers using trees as weapons. fighting skills for one on one battles with other creatures, its attack and defence abilities can each be trained and improved. David Gamez IUA Week 7 Autumn 2007 53 David Gamez IUA Week 7 Autumn 2007 54 9
Black and White The Creature is taught using a slap/stroke system. If the Creature does something the player does not want it to do, the player can slap the creature. If the Creature does something the player approves of, he can stroke the Creature. The Creature remembers whether or not you rewarded it for an action, and will not do things you slapped it for. Stroking results in just the opposite, as the creature will frequently do things you stroked it for. David Gamez IUA Week 7 Autumn 2007 55 Special Effects Massive is a software package used in the visual effects industry. Can create thousands - or millions - of agents that all act as individuals. Through the use of fuzzy logic, every agent to responds individually to its surroundings. These reactions affect the agent's behaviour, changing how they act and controlling motioncaptured animations to create a realistic looking character. David Gamez IUA Week 7 Autumn 2007 56 Massive Software Massive Crowd Simulations David Gamez IUA Week 7 Autumn 2007 57 David Gamez IUA Week 7 Autumn 2007 58 Deep Blue Deep Blue Chess-playing computer developed by IBM. 30 processors capable of calculating 11.38 gigaflops. Also contained 480 special purpose chess chips. Beat world champion Gary Kasparov in 1997. David Gamez IUA Week 7 Autumn 2007 59 David Gamez IUA Week 7 Autumn 2007 60 10
Deep Blue vs Kasparov Deep Blue Supercomputer using brute force to calculate possible moves. Evaluated 200 million positions per second. Deep Blue also had records of 700,000 past master games. The programmers studied Kasparov s previous games in great detail. David Gamez IUA Week 7 Autumn 2007 61 David Gamez IUA Week 7 Autumn 2007 62 Machine Consciousness Machine Consciousness David Gamez IUA Week 7 Autumn 2007 63 Emerging research area inspired by recent interest in consciousness. Trying to produce: Machines with external behaviour associated with consciousness. Machines with cognitive characteristics associated with consciousness. Machines with an architecture that is claimed to be a cause or correlate of human consciousness. Phenomenally conscious machines. David Gamez IUA Week 7 Autumn 2007 64 CRONOS Project CRONOS and SIMNOS 3 year project at the University of Essex and University of Bristol. First large project to be funded on machine consciousness. Includes: CRONOS hardware robot SIMNOS virtual robot SpikeStream neural simulator (the brain of the system). David Gamez IUA Week 7 Autumn 2007 65 David Gamez IUA Week 7 Autumn 2007 66 11
SpikeStream Conscious Neural Network David Gamez IUA Week 7 Autumn 2007 67 David Gamez IUA Week 7 Autumn 2007 68 COG Early system developed by Brooks et. al. at MIT. Basically an example of GOFAI. Could manage many separate behaviours, but the whole system was badly integrated. The philosopher Daniel Dennett gave a philosophical analysis of the consciousness of COG. Now a museum piece. COG David Gamez IUA Week 7 Autumn 2007 69 David Gamez IUA Week 7 Autumn 2007 70 IDA Naval dispatching system that assigns sailors to new postings. Based on the global workspace model of consciousness. Processes compete to place their information on the global workspace. Information on the global workspace is broadcast to all other processes. Cyberchild Project searching for the neural correlates of consciousness. Simulated nervous system controlling a virtual baby. Child learns to get milk by vocalising its state. David Gamez IUA Week 7 Autumn 2007 71 David Gamez IUA Week 7 Autumn 2007 72 12
Cyberchild Darwin Simulated neural architecture closely based on the brain with 200,000 neurons. Controls a robot over a wireless link. Robot learns to recognise features of its environment and develops preferences based on its emotional state. David Gamez IUA Week 7 Autumn 2007 73 David Gamez IUA Week 7 Autumn 2007 74 Darwin Conclusions David Gamez IUA Week 7 Autumn 2007 75 David Gamez IUA Week 7 Autumn 2007 76 Conclusions AI is good at solving well defined problems. Also good for modelling complex situations. Can outperform humans on well defined tasks, such as chess. Many commercial applications of AI. Conclusions Scientists are working on better AI including machine consciousness. However, human level intelligence is a long way off. So no need to worry about Terminator and irobot scenarios! David Gamez IUA Week 7 Autumn 2007 77 David Gamez IUA Week 7 Autumn 2007 78 13
Questions? Resources David Gamez IUA Week 7 Autumn 2007 79 David Gamez IUA Week 7 Autumn 2007 80 Resources Introduction to AI: http://library.thinkquest.org/2705/ Cyc logic-based system: http://www.cyc.com/ Textbook on neural networks: http://www.statsoft.com/textbook/stneunet. html Applications of neural networks in games: http://www.onlamp.com/pub/a/onlamp/200 4/09/30/AIforGameDev.html Resources Video on artificial ants: http://www.youtube.com/watch?v=ehezruu4_r M Artificial Ants solve networking problems: http://news.bbc.co.uk/1/hi/sci/tech/1537645.stm Overview of genetic algorithms and their applications: http://www.talkorigins.org/faqs/genalg/genalg.ht ml Slide show on genetic algorithms: http://www.informatics.indiana.edu/fil/cas/ppt/ Davis/sld001.htm David Gamez IUA Week 7 Autumn 2007 81 David Gamez IUA Week 7 Autumn 2007 82 Resources Evolution of a neural network to control a toy car: http://togelius.blogspot.com/2006/04/evolutionar y-car-racing-videos.html Eurobios: http://www.eurobios.com/ Artificial intelligence and the stock market: http://www.iht.com/articles/2006/11/23/business/ trading.php Stock market and genetic algorithms: http://www.newscientist.com/article/mg14419543.800.html More about the CRONOS project: http://www.cronosproject.net. David Gamez IUA Week 7 Autumn 2007 83 14