Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Introduction to Artificial Intelligence 2 Intelligence Agents. John Woodward [email protected] http://www.cs.nott.ac.uk/~jrw/ Agents, Environment, Actuators. • • • • An agent perceives its environment and manipulates it using actuators. E.g. a human has sensor organs (eyes and ears …) and actuators (hands, legs, …). • E.g. a robot has cameras and range finders for sensors and wheels and graspers for actuators. • Software agents on the internet… Percept and Perceptual Sequence. • Percept is the agents inputs at any one instance in time. • Perceptual sequence is the complete history of percepts (i.e. a list of input data). • An agent’s actions are based on perceptual sequence. • An agent function maps the perceptual sequence to an action. • We could do this as table, but we implement an agent program, which implements the function. Vacuum-Cleaner • • • • • Vacuum agent perceives which square (A or B) and if clean or dirty. It has actions; move left/right, suck, do nothing. One simple function; if current square dirty, then suck, else move to other square. • We can write perceived state and action pairs • [A, Clean] right (if in A && clean, then move right) • [A, Dirty] suck (if in A && dirty, then suck) Performance Measure. • A performance measure evaluates a sequence of environmental states. • It is not easy to design a suitable measure. • It is better to design performance measures according to the what is actually wanted in the environment, rather than how you think the agents should behave. • E.g. rewarding robot for picking up rubbish, will just empty the bins and pick up the rubbish again, rather than doing what you want and cleaning. Rational Agent Rational behavior depends on 1. the performance measure. 2. The agent’s prior knowledge of the environment 3. The actions the agent can perform 4. The agent’s percept sequence. An agent acts rationally if it uses (performs the action) what is knows (prior knowledge and perceptual sequence) to give the maximum performance measures Vacuum-Cleaner World 1.Performance e.g. one point for each clean square over 1000 time steps. 2. The environment is know a priori (e.g. only two squares, we cannot move outside, after we clean then the square is clean and not dirty). 3. Only actions are LEFT, RIGHT, SUCK. 4. The agent correctly perceives its location and if that square is clean or dirty. How else can this vary? Dung Beetle & Sphex Wasp • A dung beetle plugs its nest with a ball of dung. If the ball of dung is removed from the beetle as it is carrying it – it still continues to the nest without changing its actions. • A wasp drags a caterpillar to its nest, but check the hole first. If the caterpillar is removed, the wasp starts the process again and recheck the hole Autonomy. • A rational agent should be autonomous. • It should learn, to compensate for partial information or information it lacks (exploration vs. exploitation). • Nature “hard codes” some information in individuals (nature verse nurture). • E.g. feral children, universal grammar, new born horse. Independent offspring. • Incorporation of learning allows for the design of a single agent which will perform well in a variety of environments. 2.3 Nature of Environments. 2.3.1 specifying the task environment. • Performance: what are we measuring performance against? • Environment: what is the environment the agent will operate in? • Actuators: how can the agent affect the environment? • Sensors: how does the agent get information from the environment? 2.3.2 Properties of task environment • Fully observable vs. partially observable. • Single agent vs. multiple agent. (competitive vs. cooperative) • Deterministic vs. stochastic. • Episodic vs. sequential. • Discrete vs. continuous. • Known vs. unknown. 2.4 Structure of Agents • AI is largely about designing an agent program which controls the agent. Agent = architecture + program Trigonometric tables (lookup tables) can be compressed into a short algorithm. Intelligence is not a look up table (we could not list all of the English sentences – just too many). Can AI write programs that produce intelligent behavior? 2.4.2 simple reflex agents • Simplest agent • Action is based on Current percept only. IF condition THEH action E.G. IF car in front brakes THEN we brake. Human reflexes e.g. blinking, knee jerk. Will not be optimal if the environment is partially observable. Random actions can escape from possible infinite loops (e.g. a robot stuck between two walls), 2.4.3 model-based reflex agents Keeping a model of the world as an internal state avoids problems with partially observable worlds. • To do this we need to know two things 1. how the world changes independently of the agent (e.g. night follows day). 2. how the agent’s actions affect the world (e.g. switching on a light will make a room bright). 2.4.4 goal-based • There is a desirable goal state of the world. • Sometime it is easy to describe the sequence of actions to achieve a goal, but sometimes more difficult e.g. a Rubik cube 2.4.5 utility based agents • Goal states just provide Yes/no binary information. A more general version Is a utility function. A utility function is essentially an internalization of the performance measure. It helps in two ways; 1. A goal state may not be achievable with certainly 2. There may be multiple conflicting goals. A rational agent maximizes expected utility. 2.4.6 general learning agent. • Instead of writing the components ourselves, why not let the machine learn? Turing (1950). The learning element changes the way the agent performs. The critic affects learning. And a problem generator suggest new temporarily possible suboptimal actions which may perform better eventually. Pacman The winners of the best 2nd year group project prize have had a paper accepted at an IEEE conference. It discusses the methods they used to develop an automated Pacman player. The paper, Ghost Direction Detection and other Innovations for Ms. Pac-Man, has been accepted for the 2010 IEEE Conference on Computational Intelligence and Games, 18-21 Aug 2010, Copenhagen, Denmark. The authors are Nathaniel Bell, Xinghong Fang, Rory Hughes, Graham Kendall, Edward O’Reilly and Shenghui Qiu. The paper will eventually appear in IEEE Xplore. One of the students (Xinghong Fang), will attend the conference to present the paper and also to enter the automated Pacman player competition, which the software was developed to address.