1. SM2701 Theories of Interactivity – Class 11 Intelligent Agent Intelligent – artificial intelligence Agent - the computer software that helps you to manage and maximize your computing experiences. Remember your travel agent or property agent. From http:// www.aaai.org/AITopics/html/agents.html
2. SM2701 Theories of Interactivity – Class 11 Intelligent Agent Artificial intelligence (AI) Use of AI in interaction design and game Artificial life (Alife)
3. SM2701 Theories of Interactivity – Class 11 Alan Turing Turing test A human being engages in conversation with two parties; one is a human and another a machine/computer. The conversation can be text typing or voice. If the human being cannot tell apart which one is a human and which is the machine. The design of the machine is considered to pass the Turing test.
4. SM2701 Theories of Interactivity – Class 11 George A more sophisticated chatterbot with 3D model. Image from http:// www.televirtual.com/george.htm
5. SM2701 Theories of Interactivity – Class 11 Intelligent Conversation Is Intelligent Conversation equal artificial intelligence?
7. SM2701 Theories of Interactivity – Class 11 What else? Is intelligent conversation or playing game equal to artificial intelligence?
8. SM2701 Theories of Interactivity – Class 11 What else? Is intelligent conversation or playing game equal to artificial intelligence? Image from http:// www.lib.washington.edu/ougl/exhibits/frankenstein/images /
10. SM2701 Theories of Interactivity – Class 11 Robotics Most robots can perform automatically by its own. A common task is path finding. Let’s see an example.
12. SM2701 Theories of Interactivity – Class 11 Path finding Move from start (20) to end (4) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
13.
14. SM2701 Theories of Interactivity – Class 11 Path finding Move from start (20) to end (4) To avoid stupidity, first, we need to measure how far you are from the destination (4) from any position on the grid. We can use the c 2 = a 2 + b 2 formula as usual or we can have a easier one like: distance = abs(current_x - destination_x) + abs(current_y - destination_y);
15. SM2701 Theories of Interactivity – Class 11 Path finding Distance measurement, e.g. from 20 to 4. d = 4 + 4 = 8 We need to move the robot from 20 to 4 such that each move will shorten its distance from the destination 4. 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
16. SM2701 Theories of Interactivity – Class 11 Path finding Shortest path And at the same time, we need to remember how many steps we have traveled from the starting point 20. in order not go into a loop. We have this cost function f = g + h 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
17. SM2701 Theories of Interactivity – Class 11 Path finding Shortest path f = g + h where (g) is the sum of the costs of every cell visited along the path to the current cell; (h) is the heuristic function to indicate the distance from the current cell to the destination in the last page. 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
18.
19. SM2701 Theories of Interactivity – Class 11 Path finding Complicated algorithm (A star) Put the start node in the open list; While the open list is not empty do: Remove the cheapest node A from the open list; If it is the destination, done; For all available node B next to A: Calculate a cost to B; Check if B is on open or closed list; If so and B is more expensive, discard it; If not or this path is cheaper, move B to open list; Add A to closed list. 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
20. SM2701 Theories of Interactivity – Class 11 Path finding Complicated algorithm (A star) Step through the maze with the previous page algorithm, you can find the shortest path from start (20) to destination (4). 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
21. SM2701 Theories of Interactivity – Class 11 More AI problem Pizza delivery
22. SM2701 Theories of Interactivity – Class 11 More AI problem Pizza Time (min.) Tsuen Wan (A) Shatin (B) Kowloon Tong (C) Kowloon Bay (D) Central (E) Chaiwan (F) Tung Chung (G) Tsuen Wan (A) 15 20 30 25 45 45 Shatin (B) 15 15 20 30 40 60 Kowloon Tong (C) 20 15 15 25 40 60 Kowloon Bay (D) 30 20 15 30 30 80 Central (E) 25 30 25 30 25 45 Chaiwan (F) 45 40 40 30 25 70 Tung Chung (G) 45 60 60 80 45 70
23. SM2701 Theories of Interactivity – Class 11 More AI problem Pizza Imagine you need to deliver pizza to various places in Hong Kong, how can you find an efficient route such that you can use the shortest time and without visiting the same location twice? Suppose you are now at Kowloon Tong and have to deliver pizza to other places. What is the shortest path and the shortest time needed? Are there any systematic ways to find out the exact solution or a good enough solution?
24. SM2701 Theories of Interactivity – Class 11 More AI problem Pizza Traditional approach Starting from Kowloon Tong, find out all the next stations and calculate the time. And then find out the next stations after the next with the accumulated time.
25.
26. SM2701 Theories of Interactivity – Class 11 More AI problem Pizza All possible routes are a permutation of the seven letters A,B,C,D,E,F,G, starting from C. For example, CDEFGAB is a valid route but it may not be the shortest one. But we can calculate the time required to take this route from the table.
27. SM2701 Theories of Interactivity – Class 11 More AI problem Pizza CDEFGAB Where can we go from here? We calculate the time for this route is 200 min. How can we find a shorter one?
28. SM2701 Theories of Interactivity – Class 11 More AI problem Pizza Imagine we have a population of organisms. Each of the organism has a unique chromosome. We can say that the chromosome is the solution string like, CDEFGAB Each chromosome has 7 genes . Each of the gene can be one of the 7 letters {A,B,C,D,E,F,G}. It forms the genotype of that particular organism. For the sake of simplicity, its penotype is the same as the genotype.
29. SM2701 Theories of Interactivity – Class 11 More AI problem Pizza Each organism will survive or die according to its fitness. The fitness function is exactly the time to go through the 7 places in that particular order. For example CDEFGAB will take 200 minutes. The lesser the value, the fitter the organism. According to the 'survival of the fittest' principle, the selection process will select the fit organisms and let them 'reproduce' the next generation. In order to introduce variations in the genotype of the next generation, we can use mutation and/or crossover.
30. SM2701 Theories of Interactivity – Class 11 More AI problem Pizza Mutation is the changing of gene pattern from one generation to next. In this example, we can do some kinds of re-permutation or swapping of genes. Crossover is how two chromosomes produce two off-springs by swapping some of their genes. It uses the metaphor of sexual reproduction. The next generation will subject to the same fitness function to select the fittest ones. The fittest of all will survive and hopefully represent the shortest path going from Kowloon Tong (C) to others.
31. SM2701 Theories of Interactivity – Class 11 Learning Most previous examples focus on searching and optimization. Another application area of AI in interactivity is the perception and learning. We are going to introduce a very simple version of neural network to do something like pattern recognition, maybe in computer vision.
32. SM2701 Theories of Interactivity – Class 11 Artificial Neuron Input x 1 Input x i Output y For each input x i , there is a weight w i for it. The state of each neuron is defined by s = Ʃ w i * x i Output y will take two values depending if s is smaller or greater than a threshold value ( θ ).
33. SM2701 Theories of Interactivity – Class 11 Perceptron A simple version of neural network. Input x 1 Input x i Output y Output y = S(( Ʃ w i * x i ) – θ ) where S is the sign function gives -1 or +1.
34. SM2701 Theories of Interactivity – Class 11 Learning Supervised learning Input x 1 Input x i Output y We give some sample input and expected output (T) to a perceptron. Adjust the weight w i and the threshold θ as: w i = w i + a*(T-y)*x i ; θ = θ + a*(T-y);
35. SM2701 Theories of Interactivity – Class 11 Recognition Imagine each cell is a perceptron. 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
37. SM2701 Theories of Interactivity – Class 11 Recognition We can also have unsupervised learning, e.g. Self Organizing Map Image from http://www.k-som.com /
38. SM2701 Theories of Interactivity – Class 11 Artificial Life Use computational means to simulate the ecological and biological aspects of life and organism.
39. SM2701 Theories of Interactivity – Class 11 Karl Sims ALife video and graphics works
40. SM2701 Theories of Interactivity – Class 11 Craig Reynolds Flock behaviour
41. SM2701 Theories of Interactivity – Class 11 Christa Sommerer & Laurent Mignonneau Artificial life works
42. SM2701 Theories of Interactivity – Class 11 Max Dean, Raffaello D’Andrea Robotic Chair
43. SM2701 Theories of Interactivity – Class 11 Max Dean, Raffaello D’Andrea Robotic Chair