Você está na página 1de 7

Assignment 01

Intelligent system

MMM.Riyad

E07410073
1. Briefly describe the following in the context of Searching in AI

i. State space

This is where a problem is stated in a graphical representation. This can be a tree


representations or a graphical representation. In AI searching this helps to identify the
goal state or the solutions. In other words this is a path from initial stage to the goal state.
In a state space diagram the states are represented by nodes whereas the actions are
represented by arches.

As an example if I need to go to Colombo from kurunagela.The initial state is am in


kurunagala and the goal state is Colombo.i can reach Colombo in so many ways it can be
from chilaw or pasiyala.these ways are considered as state space in AI.

ii. Solution

Solution is the path from the initial state to the goal state. In the above example the
solutions can be traveling from pasiyala or chilaw.

In the above example we are having only two solutions there can be so many solutions
based on the scenario. The solutions may vary depending on cost effective factors and
other factors. Here in the above example the cost effective solution is traveling from
pasiyala.

i. Four criteria for evaluation of search algorithms.

There are so many algorithms where we can find solution based on that. Depth first, Breath first,
BI directional and etc.

To evaluate the above algorithms the following search criteria is been used.

• Space complexity: - How much memory is required to perform the search.


• Completeness: Ability to find a solution when there is a solution.
• Optimality: - Ability to find the highest quality solution.
• Time complexity: - How long the algorithm takes to find a solution.
2.Find the sequence of states that are identified by exploring the state space when using the
Breadth-First and Depth-First search algorithms.

Initial State ------------------------------------> Goal State


1 2 3 1 2 3
8 0 6 8 0 4
----------------------------------------------------->
7 5 4 7 6 5
1 2 3

8 0 6 RIGHT, DOWN, LEFT, UP (DEPTH FIRST SEARCH )


7 5 4

1 2 3

8 6 0
1
7 5 4

1 2 3

8 6 4 2

7 5 0

1 2 3

8 6 4 3
7 0 5

1 2 3

8 0 4
4
7 6 5
1 2 3
RIGHT,DOWN,LEFT,UP (breadth first
8 0 6
search)
7 5 4

1 2 3 1 2 3 1 2 3 1 0 3

8 6 0 1 8 5 6 2 0 8 6 8 2 6 4
3
7 5 4 7 0 4 7 5 4 7 5 4

11 12
10
6 8 9
5 7
1 2 3 1 2 0 1 2 3 1 2 3 1 2 3 0 2 3 1 3 0 0 1 3
8 6 4 8 6 3 8 5 6 8 5 6 7 8 6 1 8 6 8 2 6 8 2 6
7 5 0 7 5 4 7 4 0 0 7 4 0 5 4 7 5 4 7 5 4 7 5 4

13
14 20
15 16 17 18 19

1 2 3 1 0 2 1 2 3 1 2 3 1 2 3 2 0 3 1 3 6 8 1 3
8 6 4 8 6 3 8 5 0 0 5 6 7 8 6 7 8 6 8 2 0 0 2 6
7 0 5 7 5 0 7 4 6 8 7 4 5 0 4 1 5 4 7 5 4 7 5 4

21 22

1 2 3 1 2 3
8 6 4 8 0 4
0 7 5 7 6 5
3.Consider the following rules

if battery is good then there is electricity

if there is electricity and spark plugs are good then spark plug will fire

if spark plugs fire and there is gas then engine will run

if the engine runs, there are good tires and there is a driver then car can move

(a). Draw an inference network to show the relationship among the above rules

Battery_is_good

Engine_runs

Spark_plugs_fire

There_is_electricity
There_are_good_tire Car_can_Mo

There_is_gas
Spark_plugs_are_good

There_is_driver

(b). Given the observations: battery is good, spark plugs are good, there is gas, there are
good tires and there is ad river, explain step by step how forward chaining and backward
chaining determine whether car can move.

Forward chaining.

If we use the forward chaining, the given scenario battery_is_good concludes that
there_is_electricity. Again using forward chaining, this conclusion and the given facts
spark_plugs_are_goods gives another conclution, spark_plug_fire. Again using forward
chaining, this new conclusion and the given facts ther_is_gas gives another conclusion,
engine runs. Again forward chaining, with this conclusion and the given facts,
there_are_good_tires AND there_is_a_driver concludes that car_can_run.
Backward chaining.

whether car_can_run can be obtained by backward chaining. In order to do that, we need to


obtain that engine_runs AND there_are_good_tires AND there_is_a_driver. In order to conclude
engine_runs we have to obtain that there_is_gas (GIVEN) AND spark_plugs_fire. Hence, in order to
conclude spark_plugs_fire we have to obtain that spark_plugs_are_good (GIVEN) AND
there_is_electricity. Here we can see, there_is_electricity conclude because battery_is_good
(GIVEN). Hence, using backward chaining we conclude car_can_run.

Você também pode gostar