CM10228 / Programming Ib:
Applications of Search II: Representation &
-I. AI at Bath
- Courses in Logic, Agents, Vision, HCI. and Cognitive
- ICCS teaches
robots, scientific simulation and game AI and cognitive
science more generally (so about human and animal minds.)
- Pattern recognition & vision teach more
- taster in pattern recognition maybe
- Talk to your SSLC rep if you think we need a dedicated
machine learning course (I do!)
- AI Seminar series.
- There are also AI-related talks sometimes in the HCI,
Mathematical Foundations (logic, formal reasoning), MTRC
(vision, learning) and general Department Seminars.
- Look at Seminar link on dept. home page.
- Undergraduates can go to most of these, although we
don't organize your timetables around them.
- If you are keen, you can often work with a lecturer / help
- Look at faculty web pages (here are the AI
ones) to find out what people are interested in.
- Write someone specific, not the whole department or a
- Only do this if you have time after your
coursework – if you tend to finish things both well and
I. Representation and Searching in Advance I:
Heuristics from Programmers
- Review of Intelligence as Search
- AI problems are those that are computationally
- AI is about searching faster (improving
testing), better (improving generating) or both.
- Action is often represented as a tree, where each node
is an action, and its children are the possible actions
you could do next.
- Draw tree with root as T0, actions as a0..
an, expand one to also have a0..
an as a subtree.
- Must use heuristics to prune that tree and find a reasonable
- (Search==Intelligence) & Time
- Where the tree is not fully described, need to decide
how far to look ahead
(yes, that's really a technical term.)
- How far do you look ahead?
- May be a fixed depth (breadth first). (label T1,T2
- More often a mix of depth & breadth first such as A*
- May search for a fixed amount of time (anytime)
- May search until sufficient evidence of success
(normally represented in probability of success).
- Brains (and swarms)
seem to do both, --- they can force a decision, or
will eventually act when they have enough evidence to
pass a threshold certainty.
- Important AI Concept: Anytime
- Have an algorithm that
always gives you some solution.
- The longer you give the
algorithm, the better the solution gets.
- How many chess programs
work, some general planning systems.
- Your coursework should
(towards the end) be sort of like this–iteratively
improve until you run out of time, then submit
whatever you have (with a bit of time to tidy up
& document budgeted in).
- Design is search by the
- My PhD research area, see Designing
- Developing AI is basically a process of trading off
search / development with search / planning / learning
done by the machine.
- Want to do as little work as you can, but
- Want machine to reliably work.
- As usual, modularity can help simplify the system and
therefore reduce search for everyone/thing.
- You can think of programming languages as sets of
- You are the
intelligent system that other programmers have tried to
- Languages like Java are designed to give you a
heavily-pruned search space so you are likely to
- This is why sometimes programmers can chance on the
right answer to a question even sooner than they can
understand how to solve the question.
- Using good technique makes it likely you will find
- Letting AI do some of the search over known good
strategies is the key to many industrial applications of
- Production Rule Systems
- Production: perceptual context / precondition connected to
- Many productions in a system
- action selection:
- go through all productions,
- find one that's precondition matches the current
- execute / `fire' its action
- Problem: many productions can be triggered (be able
to fire / have their preconditions match the context) at
the same time.
- e.g. it's day, AND it's raining
- Needed: a system for choosing which production to run.
- Many systems have rules like recency, efficacy (must
learn for both of these)
- Soar does a search if more than one rule files, then
saves the results of the search as another production.
- Supposed to be like the brain.
- Often learns too much!
Payne has shown that people don't learn if a
look-up is easy enough.
- ACT-R has Bayesian statistics on efficacy as well as
learning new productions.
- Both use "problem space" to narrow number of
possible productions tested.
- Expert Systems are production rule
systems that encode knowledge elicited from experts.
- The elicitation part is hard – experts know things
- becoming expert involves learning new categories /
triggers (pattern recognition, next lecture) and new
actions (below & AI lecture IV)
- Perhaps should be called "novice systems"
- novices follow sets of rules
- experts recognize situations.
- Have got bad press (partly due to too large of sales
pitch) but still used in industry.
- Leading cognitive
modelling systems are also based on productions
- forming productions is very similar to a basic part
of animal intelligence, associative
AI (that's my web page on the subject!)
- Designers replace evolution in providing the small
search area for what to do next.
- Will hopefully show
slides about this approach.
II. Searching in Advance II: Learning
- Many people think learning is "real" AI – "no one programs
- Wrong. Will learn about evolution next week.
- Just like AI is a tradeoff between search by a designer
& by a machine, human intelligence exploits search
from many sources: information from genes (search by
evolution), information from culture (search by society),
information you figure out yourself (individual search).
- In humans, individual search is also split between
- episodic memory vs. semantic memory
- need to record events, but can't record everything,
use a low-bit representation based on previous
- improve the previous semantic knowledge from
- This is why testimony can change if a lawyer teaches
a witness a new way to think about the world.
- Brains didn't evolve to record veridical history,
they evolved to do the right
thing at the right time.
- Perceptual memory
- can remember any line, but not all, of a grid of
stimuli seen only briefly
- time & the observer -- hit something (in a car)
THEN see it
- Physical bodies are also an example
- E.g. how we pick something up is limited / enabled
by the number of arms we have, which way the joints
- Reduces search space => affects expressed
behaviour => part of intelligence!
with legs which became a famous
company recently bought by Google.
- In AI, learning is another kind of search
- search done in advance
- developers determine what is changeable and how it
changes i.e. parameters.
- experience determines how those parameters have to be
- Some people think no AI should learn!
- Intelligence is too complicated to be changed on the
- Konrad Lorenz
- Rodney Brooks
- Nick Bostrom (sort of, for a different reason)
- But some things can't be programmed in advance
- maps of environment
- name of robot & owner
- perceptual aliasing (draw bug robot on board)
- Also, some things are more efficient to learn than to
- parameters for control that depend on individual
specification in motors.
- anything that can be learned reliably (see above about
- Kinds of representation:
- none --- environmental determinism
- can still get very varied behaviour, because the
environment keeps changing
on a beach
- deictic representation
- minimalist reference that can change, driven just by
- "the surface in front of me" instead of "floor"
- "the person shooting at me" instead of "Simo Häyhä"
- "the obstacle" instead of "elephant"
- specialised representations
- if you know what the agent needs to learn, give it a
place to store it and a special-purpose memory, e.g. a
map for your bots
- general purpose representations
- neural networks (today)
- genetic programming (friday)
- these are all fail ultimately for the same reason as
the rest of intelligence â€“ combinatorics
- however, they have all also been quite useful in
- Bottom line: learning is still search, it's just search in
advance, and search with a lot of biases / pruning already
- Many kinds of machine learning, again, could easily be a
- These are in the library!
- Don't neglect simple answers : giving variables and
filling in solutions when they become apparent.
- This approach can also be formalized: frames, case-based
- My work: Behaviour Oriented Design,
- extends OOD to AI
- just use state in objects for learning.
- Come to seminars if you like!
page author: Joanna
26 March 2015