COMP 424 - Artificial Intelligence Lecture 1: Introduction to AI! Instructor: Joelle Pineau (jpineau@cs.mcgill.ca) Class web page: www.cs.mcgill.ca/~jpineau/comp424 Unless otherwise noted, all material posted for this course are copyright of the instructor, and cannot be reused or reposted without the instructor s written permission. Outline for today Course basics Overview of AI history Approach to teaching AI Examples of AI applications 2 1
Course objectives To develop an understanding of the basic concepts of AI: classes of problems, mathematical models, algorithms. To have an informed opinion about AI-related technologies. To interact with people working in the field. 3 About You (as of Jan.4 2014) 159 registered, from a variety of departments / faculties Computer Science Software / Electrical / Mechanical / Chemical Engineering Mathematics / Statistics / Physics Biology / Physiology / Anatomy / Neuroscience Cognitive science / Linguistics Economics Undeclared / Exchange 4 2
About myself Education: BASc in Engineering (U.Waterloo) 1993-1998 MSc / PhD in Robotics (Carnegie Mellon U.) 1998-2004 Prof at McGill 2004- What kind of AI research do I do? Machine learning Planning and decision-making Robotics Personalized medicine and health-care 5 Research areas in my lab Reinforcement learning Supervised learning Representation learning Education MDP / POMDP Algorithms Other applications Planning Sequential Decision- Making Problems Healthcare Robotics Dynamic treatment regimes Adaptive trials Event prediction Smart wheelchairs Social navigation Marketing Resource management Industrial processes Human-robot interaction 6 3
Research focus Main scientific goal: Design AI agents (robots) that exhibit intelligent behavior by providing them with the ability to learn and reason. Abilities Goals/Preferences Prior Knowledge AI agent Observations Actions Environment Main tools: Probability theory, statistics, optimization, analysis of algorithms, numerical approximations, robotics, 7 SmartWheeler project COMP-102: Computers and Computing 8 4
Adaptive deep-brain stimulation Goal: To create an adaptive neuro-stimulation system that can maximally reduce the incidence of epileptiform activity. 9 About the course Search Game playing Logical reasoning Classical planning Probabilistic reasoning Learning probabilistic models Reasoning with utilities Sequential reasoning and decision-making. Learning complex sequential decisions. Applications Basic tools Logical representations Probabilistic representations 10 Utility theory 5
About the course: Comments from 2014 Way more boring than I had expected. My interest in machine learning and artificial intelligence is significantly less as a result of the course. I do not recommend this course for people who intend to make use of artificial intelligence or machine learning in the future as one may develop a distaste for the material. Needs more prerequisites. The entire second half of the course is extremely difficult to follow without prior experience with statistics and probability. Too much focus on probability instead of actual AI. The workload for the course (which is 3 credits) was beyond 4-credit level. This course would be better if it did not attempt to appeal to a large class size. This is a 400 level course and cannot be taught like a 200 level intro course. The class was far too large. The TAs were so tight on time that they could barely provide any feedback on the assignments. The only feedback I've received was basically "see the solutions. 11 About the course Textbook: Russell & Norvig. Artificial Intelligence: A Modern Approach, 3 nd ed. Evaluation: 1. Individual quizzes in class (5%) 2. Individual assignments (20%) 3. Project: Implementation and written report (20%) 4. Midterm (15%) 5. Final exam (40%) Lecture notes (slides), assignments, solutions, project information, all available on class website. If all goes well, lectures will be recorded and available on mycourses. 12 6
Course Project Design and implement a game playing program. Use ideas from the course to design your algorithm. Basic code (for a random player) will be provided in Java. You can use any programming language. Enter your program in a tournament against programs from other students. Evaluation: 50% code and competition results, 50% written report. Written report must be clear, complete, including appropriate references. Code must compile and run. Project info will be posted as it becomes available on class webpage. 13 Coursework policy Format of coursework: Some programming, some theory, some problem-solving, some application. Quizzes will be given in class, can be solved collaboratively, but must be submitted individually on mycourses by 2pm on the same day. Assignments are individual, submitted through mycourses by 11:59pm on the due date. Project should be submitted also on mycourses. Late submissions are subject to 10% penalty up to 5 days; after this will not be accepted. Late quizzes or assignments will NOT be accepted. No make-up midterm will be offered. Marks for any incomplete item (incl. not submitted or incorrect work) except the project will be shifted to the final exam. 14 7
About the course Weekly office hours: Joelle Pineau: Mon. 1:00-2:30pm MC 106N Eric Crawford: T.b.d. MC 111 Angus Leigh: T.b.d. MC 111 Ryan Lowe: T.b.d. MC 111 See copy of syllabus on course website for updated days/times. www.cs.mcgill.ca/~jpineau/comp424/syllabus.html (Other times possible by appointment.) Best way to contact us: Email (see course syllabus for addresses) 15 Expectations You must have taken the pre-reqs to register. Come to class prepared, do the readings, follow the lectures. Ask questions, be engaged in your learning, be willing to work hard. Keep up with the assigned coursework. Respect the coursework policy. Use technology (email, discussion boards) appropriately. COMP-598: Applied Machine Learning 16 8
On the use of mobile devices in class Many bring mobile computing and communication devices to class. This can be useful! Taking notes, supplementing course material. This can be distracting! For you, for me, for your colleagues. Policy for this course: Use is encouraged during quizzes. Use is tolerated during lectures in support of learning. Use for other purposes happens outside of the classroom. For more discussion of this issue, see: http://www.mcgill.ca/secretariat/sites/mcgill.ca.secretariat/files/mobile-computing- Commun-devices-MC2-guidelines-11June2010.pdf 17 Read this carefully Some of the course work will be individual, other components can be completed in groups. It is the responsibility of each student to understand the policy for each work, and ask questions of the instructor if this is not clear. It is the responsibility of each student to carefully acknowledge all sources (papers, code, books, websites, individual communications) using appropriate referencing style when submitting work. We will use automated systems to detect possible cases of text or software plagiarism. Cases that warrant further investigation will be referred to the university disciplinary officers. Students who have concerns about how to properly use and acknowledge third-party software should consult the course instructor or TAs. COMP-598: Applied Machine Learning 18 9
Questions? COMP-598: Applied Machine Learning 19 What is biological intelligence? Sensory processing: Visual cortex. Auditory cortex. Somatosensory cortex. Motor cortex. Cognitive functions: Memory. Reasoning. Executive control. Learning. Language. 20 10
What is biological intelligence? A mix of general-purpose and special-purpose algorithms. General-purpose: Memory formation, updating, retrieval. Learning new tasks. Special-purpose: Recognizing visual patterns. Recognizing sounds. Learning language. All are integrated seamlessly! 21 What is AI? 22 11
What is AI? Some answers: Modeling human cognition using computers. Studying problems that others don t know how to solve. Cool stuff! Game playing, machine learning, data mining, speech recognition, computer vision, web agents, robots. Useful stuff! Medical diagnosis, fraud detection, genome analysis, object identification, space shuttle scheduling, information retrieval. My (current) best answer: Developing models and algorithms that can produce rational behaviors in response to incoming stimulus and information. 23 What is AI? Human intelligence: Artificial Intelligence: Sensory processing: Visual cortex. è Computer vision Auditory cortex. è Signal/speech processing Somatosensory cortex. è Haptics Motor cortex. è Robotics Cognitive functions Memory. è Knowledge representation. Reasoning. è Search, inference. Executive control. è Planning, decision-making. Learning. è Model learning. Language. è Language understanding. 24 12
About the course Search Basic tools Game playing Logical reasoning Logical representations + search, inference, planning Classical planning Probabilistic reasoning Learning probabilistic models Probabilistic representations + inference, learning Reasoning with utilities Sequential reasoning and decision-making. Learning complex sequential decisions. + planning, decision-making Applications 25 Different goals of AI This would be pretty awesome! Thinking Humanly Acting Humanly Thinking Rationally Acting Rationally 26 13
Acting humanly AI is about duplicating what the (human) brain DOES. Alan Turing (1912-1954) had interesting thoughts about this. Can a machine think? -> If it could, how would we tell? Turing (1950): Computing machinery and intelligence Human interrogator? Human AI agent An operator interacts with either the human or the AI agent. Can he correctly guess which one? 27 Turing s prediction By 2000, a machine would have a 30% chance of fooling a lay person for 5 minutes. Suggested major components of AI: Knowledge representation, automated reasoning, language understanding, machine learning But here s a thought: We succeeded in building flying machines when we stopped trying to imitate birds, and started learning about aerodynamics. 28 14
Different goals of AI Thinking Humanly Acting Humanly Thinking Rationally Acting Rationally Let s try this! 29 Acting rationally Rational behaviour = doing the right thing. Doing what is expected to maximize goal achievement, given the available information and available resources. Does not necessarily require thinking (e.g. blinking reflex). But in many cases, thinking serves rational behaviour. This is the flavour of AI we will focus on. 30 15
Big picture Action THE WORLD Task & Environment AI Agent Perception 31 Rational agents This course is about designing rational agents. An agent is an entity that perceives and acts. Goal: Learn a function mapping percept histories to actions: f : P h A A rational agent implements this function such as to maximize performance. Performance measures: goal achievement, resource consumption,... Caveat: Many constraints can come into play (time, space, energy, bandwidth, ) which make perfect rationality unachievable. Objective: Find best function for given information and resources. 32 16
AI Beginnings ENIAC: First super-computer, created in 1946. Early work in 1950s: Rosenblatt s perceptron Samuel s checkers player 33 Dartmouth Conference (1956) 34 17
Dartmouth Conference (1956) Some of the attendees: John McCarthy: LISP, time-sharing, application of logic to reasoning Marvin Minsky: popularized neural networks and showed their limits, introduced slots and frames Claude Shannon: information theory, juggling machine Allen Newell and Herb Simon: bounded rationality, general problem solver, SOAR The meeting coined the term artificial intelligence'' 35 Early AI hopes and dreams Make programs that exhibit similar signs of intelligence as people: prove theorems, play chess, have a conversation. Logical reasoning was key. Learning from experience was considered important. The research agenda was geared towards building general problem solvers. There was a lot of hope that natural language could be easily understood and processed. 36 18
Recent AI: Math to the rescue! Heavy use of probability theory, decision theory, statistics. Trying to solve specific problems rather than aim for general reasoning. AI today is a collection of sub-fields: Perception and computer vision. Natural language understanding. Robotics Etc. Reasoning is now the part named ``AI''. A lot of progress was made in this way! Some recent efforts try to put all this together (e.g. in robotics). 37 Example AI system (1997): Chess playing IBM Deep Blue defeats Garry Kasparov. Perception: advanced features of the board. Actions: choose a move. Reasoning: search and evaluation of possible board positions. www.bobby-fischer.net http://www-03.ibm.com 38 19
Example AI system (2008): Poker playing University of Alberta s Polaris defeats some of the world s best online pros. One variety of poker: Heads-up limit Texas Hold em (two players, limited betting amounts) Perception: features of the game. Actions: choose a move. Reasoning: search and evaluation of possible moves, machine learning. http://poker.cs.ualberta.ca/ 39 Example AI system (2011): Jeopardy! 40 20
AI meets markets Trading agent competition (2002-2012): http://www.sics.se/tac/ Trades Stock market Trading Agent Rates, news 41 AI meets markets 42 21
Example AI system (1992): Medical diagnosis Pathfinder (D. Heckerman, Microsoft Research) Perception: symptoms, test results. Actions: suggest tests, make diagnosis. Reasoning: bayesian inference, machine learning, Monte-Carlo simulation. http://lls.informatik.uni-oldenburg.de/dokumente/1996/96_icls/icls_96_5.gif 43 Example AI system (2008): Reading the Mind Brain Image Analysis (T. Mitchell, CMU) Perception: brain imaging using fmri technology. Actions: detect which word (e.g. hammer, apartment, ) is being read by the human subject. Reasoning: statistical machine learning. http://www.cs.cmu.edu/afs/cs/project/theo-73/www/index.html 44 22
Example AI system (2003): Digit recognition Handwritten digit recognition: <1% error. New example to classify Previously seen known examples... Boxes represent the weights into a hidden node in a neural network learner. COMP-424: Applied COMP-598: ArtificialMachine intelligence Learning 45 Example AI system (2014): Object recognition ImageNet Large Scale Visual Recognition Challenge Image database with 1000 object categories, hundreds of example images for each class, over 1 million images in total. Current best results: 7% classification error. 46 http://image-net.org 23
Example AI system (1998): Automatic driver ALVINN (D. Pomerleau, CMU) drives autonomously for 21 miles on the highway at speeds of up to 55 miles/hour. Perception: digitized camera images of the road. Actions: 64 steering angles. Reasoning: artificial neural network. 47 Example AI system (2005): Off-road driving Stanley (Stanford University) navigates 132 miles through desert terrain in less than 10 hours, with no human intervention. Perception: GPS, 6-D inertial measurement, wheel speed, 4 lasers, 1 radar, stereo and monocular cameras. Actions: actuation of drive-by-wire system. Reasoning: position estimation, path planning. http://cs.stanford.edu/group/roadrunner//old/index.html 48 24
Example AI system (2014): City driving Google cars have logged over 700,000 miles in autonomous mode without any accident. Sensors and actuators similar to Stanley (GPS, 3D laser point cloud, cameras, odometry) Significant prior knowledge: City of Mountain View (12-square-mile) is fully mapped at high resolution. 49 AI and the Web Web crawling, search engines, information retrieval. Exploiting web-based content for other tasks: translation, text summarization, fact checking. Social networking, trend spotting. Recommendation systems. Etc. 50 25
Final comments Come to class! Come prepared! Be willing to learn and work hard! For next class: Read chapters 1&2 in Russell & Norvig. Review the course syllabus. Questions? 51 26