Revision d7cddf084a7721e0ec55fa7e3eeec7acee0bf465 (click the page title to view the current version)

Rational Agents

Changes from d7cddf084a7721e0ec55fa7e3eeec7acee0bf465 to 806ee18958a5ef401cce422281a47f762ae814e2

title: Rational Agents
categories: session

# Preparation

*Reading* Russel & Norvig Chapter 2
*Reading* Russel & Norvig Chapter (1-)2

# Learning outcomes

After the completion of this workshop, students should

+ be familiar with CodinGame and have successfully solved some of the recommended Medium puzzles.
+ be able to analyse problems with respect to PEAS (performance measure, environment, actuator, sensor).
+ understand and be able to explain what kind of agent they have implemented (e.g., reflex agent, planning agent, etc.) and whether their agents (or more generally, solution methods) are rational.
+ be familiar on an introductory level with basic data structures and algorithms (e.g., lists, sets, trees, binary search, greedy search).
+ be able to understand and answer the sample exam questions posted on Blackboard that relate to the material covered in this workshop.

# Briefing

See [Lecture on Rational Agents]()

# Robin's

## Module evaluation

We briefly discuss the current status, new material available,
and questions and problems (practical, curricular, etc.) related to the course so far.
In particular, please let the teacher know if you have any comments or suggestions 
regarding the flipped classroom approach presented in \citet{bye18}.

## Discussion about AIMA Ch. 1

We discuss the content presented in AIMA Ch.~1 and in the related CS188x material.
Core talking points:

+ four definitions of AI along the axes of thinking and acting humanly and rationally.
+ foundations of AI, e.g., philosophy, mathematics, economics, neuroscience, psychology, computer engineering, control theory and cybernetics, linguistics
+ the history of AI
+ applications of AI and state-of-the-art

We divide the class into four groups for each of the talking points.
You can use OneNote to enter some notes from your brainstorming.
Finally, each group present briefly their topic before a short discussion and comments from the class and teacher.

## Discussion about AIMA Ch. 2

We discuss the content presented in AIMA Ch.~2 and in the related CS188x material.
Core talking points:

+ definition of agent 
+ percept and percept sequence
+ agent function and agent program
+ rational agents and performance measures
+ omniscience, learning, and autonomy
+ task environments and PEAS
+ properties of task environments
+ table-driven agents
+ simple reflex agents
+ model-based reflex agents
+ goal-based agents
+ utility-based agents
+ learning agents

Working in pairs, each student in a pair will get 10~mins to prepare a talking point from the list, before giving a short oral presentation to the other student, and vice versa. 
This is called *peer-tutoring*.
Afterwards, we will discuss the exercise and clarify certain topics and questions you might have (if any).

## End-of-chapter exercises in AIMA Ch.~2

Working individually or in pairs, students will be assigned an exercise from the end-of-chapter exercises in AIMA Ch.~2.
After having worked on the problem for a little, with notetaking in OneNote, the worked solutions will be presented to the rest of the class.

# Exercises

We continue solving coding challenges primarily on CodinGame. 
As we progress, try to draw a connection between the coding challenges and the topics we learn. 
Some help on particular puzzles is provided in the Forum on Blackboard. 

## Preliminaries

Note that knowledge about various data structures and trees, in particular, binary search trees, will be useful before implementing algorithms presented in this course.
You should explore such functionality in your programming language of choice,
e.g., in Java, the 
[Collections Framework](
includes various useful interfaces and classes, e.g.

+ Set: HashSet, TreeSet, LinkedHashSet
+ List: ArrayList, LinkedList
+ Deque: ArrayDeque, LinkedList
+ Map: HashMap, TreeMap, LinkedHashMap

## Challenges

In CodinGame, the following challenges may be useful:

+ There is no Spoon (medium): lists
+ Telephone Numbers (medium): trees, sets
+ Advanced tree (medium): tree	
+ Shadows of the Knight Episode~1 (medium): intervals, binary search
+ Bender Episode 1 (medium): state machine, simulation
+ The Gift (medium): greedy algorithms
+ Skynet Revolution* (medium): BFS, graphs

Note that Skynet Revolution goes a step further into breadth first search (BFS),
which is presented first in R&N Ch.~3.
Also, note that you may have to complete a number of prerequisite Easy challenges 
to \textit{unlock} the above challenges.

# Homework

Prepare yourself for the next workshop by doing the following:

1.  Review the reading material for this class.
2.  Do the preparation for the next lecture, on [Search]().