Professional Documents
Culture Documents
Ai Assignment 1
Ai Assignment 1
KWEEZI JOSEPH
SOLUTION;
Question 1
Learning agent is a tool in AI that is capable of learning from its experiences. It starts with some basic
knowledge and is then able to act and adapt autonomously, through learning, to improve its own performance.
Example;
Imagine you've decided to start driving for a cab service. It's a Friday night and you're running your typical route
from the nightlife scene to many of the hotels away from the downtown area. You've become accustomed to
taking the Maple Street exit to pick up your customers, but tonight you opt for Palace Road for a change of pace.
To your surprise, you discover that Palace Road is not only quicker, but you can avoid the accident-prone
intersection at Maple and Vine. You decide that, in the future, you'll be sure to take Palace Road.
You probably guessed there's a deeper meaning to the example. It's an illustration of an idea in artificial
intelligence (AI) known as a learning agent.
Question 2
a) Simple-reflex
A simple reflex agent is the most basic of the intelligent agents out there. It performs actions based on
a current situation. When something happens in the environment of a simple reflex agent, the agent
quickly scans its knowledge base for how to respond to the situation at-hand based on pre-determined
rules.
Example
It would be like a home thermostat recognizing that if the temperature increases to 75 degrees in the
house, the thermostat is prompted to kick on. It doesn't need to know what happened with the
temperature yesterday or what might happen tomorrow.
1
MAY19/BCS/004U
KWEEZI JOSEPH
Pseudocode
Example
At the start of the new year, Brett set a very specific goal for himself and his wife: a two-week trip to Greece.
Brett knew it was going to take several months of putting a plan into action in order to board the flight and make
his goal a reality.
Among the steps he identified for achieving his goal were saving money for the airline tickets, booking the hotel
and collecting several traveller’s guides for exploring the area. By actively pursuing these steps, Brett was able
to achieve the goal he set for himself by the summer.
Pseudocode
2
MAY19/BCS/004U
KWEEZI JOSEPH
You've been planning a road trip for a few weeks and the big day is finally here. You get everyone loaded into
the car, fire up the GPS, and set off in the direction of your weekend adventure. Two hours into your travel, you
approach bumper-to-bumper traffic. It appears as though there might be a car accident up ahead. Automatically,
your GPS starts to look for a new route around the hazard, and you are able to exit the highway and navigate
around the traffic pile-up.
Pseudocode
Example
Imagine you've decided to start driving for a cab service. It's a Friday night and you're running your typical
route from the nightlife scene to many of the hotels away from the downtown area. You've become
accustomed to taking the Maple Street exit to pick up your customers, but tonight you opt for Palace Road
for a change of pace. To your surprise, you discover that Palace Road is not only quicker, but you can avoid
the accident-prone intersection at Maple and Vine. You decide that, in the future, you'll be sure to take
Palace Road.
Pseudocode
3
MAY19/BCS/004U
KWEEZI JOSEPH