BCS303 - Artificial Intelligence Part1 31st Oct 2023
BCS303 - Artificial Intelligence Part1 31st Oct 2023
NOTES
Learning Outcomes
a) Show how intelligence databases are built and used using Prolog
b) Apply the basic principles, models and algorithms of AI to recognize,
model and solve problems in the analysis and design of information
systems
c) Analyze the structures and algorithms of a section of techniques related
to searching, reasoning, machine learning and language processing
d) Review research articles from well-known AI journals and conference
proceedings regarding the theories and applications of AI
e) Show ability to carry out independent(or in a small group) research and
communicate if effectively in a seminar setting
Course Contents
1. Definition of Artificial Intelligence
2. Intelligent agents and problem solving as search
3. Uninformed search
4. Informed/Heuristic search
5. Local search and constraint sat search
6. Game playing
7. Representing knowledge and propositional logic
8. First order logic and description logics
9. Logical reasoning
10. Uncertainly reasoning and basic probability theory
11. Graphical models
12. Machine learning/induction
13. Learning with knowledge
14. Probabilistic sequence processing
15. Speech and language processing
1
INTRODUCTION
2
History of AI
Computer science based AI started with Dartmouth Conference in 1956. It was
attended by John McCarthy (LISP, application of logic to reasoning), Marvin
Minsky (popularized neural networks, slots and frames, the society of the mind),
Claude Shannon (Computer checkers, information theory and open-loop 5-ball
judging), Allen Newell and Herb Simon (General problem solver).
Components of artificial intelligence
An agent: the agent perceive its environment through sensors and acts on the
environment through actuators. For human: sensors are eyes, ears; actuators
(effectors) are hands, legs, mouth. For robot: sensors are cameras, sonar, lasers,
ladar, pump; effectors are grippers, manipulators, motors;
What is rationality in AI?
Rationality means that an AI agent is assumed to take account of available
information and uncertainty, potential costs and benefits, and to act consistently
(logically) in choosing the best action. A rational agent does the right thing. A
fixed performance measure evaluated the sequence of observed action effects on
the environment. The PEAS is used to describe a task. PEAS means Performance
measure, Environment, Actuators and Sensors. For a taxi driver example:
performance measure: safe, fast, comfortable and maximize profit; Environment:
roads, other traffic, pedestrians and customers; Actuators: steering, accelerator,
brake, signal and horn; Sensors: cameras, sonar, speedometer, GPS, odometer,
accelerometer and engine sensors.
Agent’s environment can exhibit different properties including: fully or partially
observable, deterministic or nondeterministic, episodic or sequential, static
semi-dynamic or dynamic, discrete or continuous and single agent or
multiagent.
Assignment: Classify the environment properties (observable, deterministic,
episodic, static, discrete and agents) for each of the following agents:
a) is provided as an example.
a) Taxi driving (partial, nondeterministic, sequential, dynamic, continuous,
multisingle)
b) Chess e) Robot part picking
c) Medical diagnosis f) Interactive English Tutor
d) Image analysis
Types of Agents
There are five types of agents based on increasing in generality and ability to
handle complex environments: simple reflex agents, reflex agents with state, goal
3
based agents, utility based agents and learning
agents. Simple reflex agents use simple if then
rules which can also be short sighted.
Example of a simple reflex agent is the vacuum
agent. In the simple world, the vacuum cleaner
agent has a location sensor and a dirt sensor so
that it knows where it is (room A or room B) and
whether the room is dirty. It can go left, go right, suck, and idle. A possible
performance measure is to maximize the number of clean rooms over a certain
period. The mode of operation is such that If status=Dirty then return Suck else
if location=A then return Right else if location=B then right Left.
SimpleReflexAgent(percept)
state = InterpretInput(percept)
rule = RuleMatch(state, rules)
action = RuleAction(rule)
Return action
4
In Utility-Based Agents, Evaluation function
is used to measure utility f(state) -> value. It is
useful for evaluating competing goals
SEARCH
5
scenarios and alternatives. The algorithms provide search solutions through a
sequence of actions that transform the initial state to the goal state. Search
algorithms are characterized by completeness, optimality, time complexity and
space complexity. Search algorithms work in two main phases: defining the
problem and searching in the search space.
Factors that needs to be defined while formulating a problem include: initial
state, state space, actions, goal state, goal test and path cost. After defining the
factors above, the agents use the search algorithms to perform a search in the
search space. Search algorithms are of two classes: uninformed and informed
search. Uninformed search (blind) algorithms include: depth1 first search (stack
based data structure), breadth2 first search (queue based data structure) and
uniform3 cost search. Informed search algorithms include: greedy4 search, A*
tree search and A* graph5 search6.
Search algorithms can be applied in vehicle routing, nurse scheduling problems,
retrieving records from database and industrial processes.
Assignment: Student to describe and illustrate the mechanism of operation of any
two (2) of the uninformed and informed search algorithm. The student
to explain any advantages and disadvantages of each of the search
algorithm. A student to list down any two applications of each search
algorithms. This work will also be presented in class next week.
1 https://www.programiz.com/dsa/graph-dfs
2 https://www.programiz.com/dsa/graph-bfs
3 https://www.javatpoint.com/ai-uninformed-search-algorithms
4 https://www.programiz.com/dsa/greedy-algorithm
5 https://cs.stanford.edu/people/abisee/gs.pdf
6 https://cs.stanford.edu/people/abisee/tutorial/astar.html
6