**The exam/project has been submitted by myself is solely my own work and I did not get any aid from other people.**

**Note**: Please make sure to read the last page of the exam which is about the instructions, before start to solve the exam

**Problem 1: **Given the following puzzle you are requested to design an agent to go around in the puzzle**. Your agent can move only 2 squares in each direction, **for example, if start point is S(0,0) and it moves towards right it can go to (2,0) as in the figure below**. **While the agent moves, it can jump over a black square but it cannot land over it. For example, no move can go over the point (1,0).

Assumming that this agent first moves to forward (up ) then right( ), then back (down ) and then left ( ) in its move.

0 | 1 | 2 | 3 | 4 | (x-Axis) | |||

0 | S | x | ||||||

1 | ||||||||

2 | ||||||||

3 | ||||||||

4 | ||||||||

(y- axis) |

- Starting from point S, please draw a search space for this agent (you can use coordinates for that. Please
**apply loop detection**. (10 pts) - For the above agent and its environment, please answer the following questions. Please write
__one__**sentence problem specific explanation and do not forget to tell the answer (ex: because of …. It is episodic)**. One word answers (ex: static or dynamic) or the definitional answers which is not specific to the problem will not get any points. (16 points)

1-Is the environment __Accessible or Inaccessible__?

2-Is the environment __Deterministic or Non-deterministic?__

3-Is the environment __Static or Dynamic__?

4-Is the environment __Discrete or Continuous__?

- What is the type of this problem? Explain in one sentence. (Single word answers will not get any point) (4 pts)

**Problem 2**: Consider the following search problem as represented in the below tree. The start state is given as A and the goal state is represented as G (all of the nodes represented as G1, G2, G3, G4 are actually the same goal G but they are numbered to ease your work in solution)

In the below tree, number on the edges which are black represents the actual cost between the nodes and the red values on the nodes represent the heuristic value.

Please answer the following questions by using the above tree. Some of the rules you should follow in your solutions as follow.

- Do not use colors in your solution.
- In order to write numbers next to G do not use G1 but either use subscript and write G1.
- Any cost information written like B2 will not be accepted you should use superscript and it should be written B
^{2} - In the questions
even it is possible to solve it in another way, the solutions with different methods won’t be accepted.__you should use the queueing techniques as it is done in the lectures__ - While using the letters in the queue use font-14 (Arial) ex: A
- For queuing techniques please use the reserved places for you. To show the expanded nodes please use the word (insert-shapes-line) so that it can be easily detected as an example A
- Follow the line numbers in an order when your write your queue which is top to down.
- Do not change the font or the format of the below reserved spaces for the questions
- If you need to draw, please use (insert-shapes)
- In the queue if you have a node with the same cost of the new expanded one, add the new expanded one after the one available in the queue.

- What solution path will
**Breadth First Search**returns? Write the path and show how you reach the goal by using queuing technique (10 pts )

Path:

- What solution path will
**Iterative Deepening Search**returns? Write the path and show how you reach the goal by using queuing technique ( 10 pts)

Path:

- What solution path will
**Uniform Cost Search**returns? Write the path and show how you reach the goal by using queuing technique e (10 pts ) - What solution path will
**A* Search**returns? Write the path and show how you reach the goal by using queuing technique (10 pts )

Path:

- For the above given tree and the solutions of the four search algorithms you solved ( BFS, IDS, UCS, A* ), what is the highest space complexity among all the algorithms
**particularly for this example**and how did you obtain it? Please explain in 2 sentences ( Please not the I am not asking bigO notation I am asking a literal number like 50)In your explanation, If you need to refer to the above solutions please do so. (10 points)

**Problem 3:** You are given a game which has the following rules:

You have a single token x, and it can move,

- Two squares right which has to follow with 1 square up or down (ex: if the token (x) in (2,3) goes to right, it should also either go to (4,2) or (4,4))
- Two squares left which has to follow with 1 square up or down
- Two squares up which has to follow with 1 square right or left
- Two squares down which has to follow with 1 square right or left

0 | 1 | 2 | 3 | 4 | 5 | 6 | |

0 | |||||||

1 | |||||||

2 | |||||||

3 | x | ||||||

4 | |||||||

5 | |||||||

6 |

- Provide an admissible heuristic, means it should be admissible for a given
(example below). Please provide your heuristic like a formula and then explain the formula if it is needed with an example ( not more than 2 sentences) (10 points)__any start state to any goal state__

EX: | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | |

0 | 0 | ||||||||||||||

1 | 1 | ||||||||||||||

2 | S | 2 | |||||||||||||

3 | 3 | ||||||||||||||

4 | 4 | ||||||||||||||

5 | 5 | ||||||||||||||

6 | 6 | G |

(in the example the first grid is a start state and the second grid is a goal state)

- Independent than the above problem. Assume that for any game, the actual cost from start state to the goal state is 50. You have two admissible heuristics which h1 have an estimate 40 and h2 has an estimate 30. Which one of the two admissible heuristic would you choose to use in your algorithm for a better solution? Explain the reason in two sentences (answer with no explanation will not get any point) (10 points)

**Submission Instructions: **

** **__1-MAKE SURE TO FILL THE FIRST PAGE OF THIS FILE. __

Submission without the name, id, and acceptance of statement (you** can put your name**) in the first page will not be accepted

2-**You are requested to place your answers to this file under the questions. Please use Microsoft word to write your answers**.

3- It is your responsibility to read the questions carefully. Any solution that is not matching with the questions will not be graded. Example, if question tells you to explain the answer in 2 sentences and you write a long explanation only the 2 sentences will be taken as an answer.

4- Your answer will be checked for **plagiarism**. Any plagiarism among you or another resources will cause you to get zero from the exam.

5- Questions are explained in details therefore no questions will be accepted about the exam.

6- You need to submit this exam electronically through the reserved place in Moodle

You should submit your answers as:

**studentno_name_surname_comp415_midterm.docx**

** **

Order Now

Payment Methods

All online transactions are done using all major Credit Cards or Electronic Check through PayPal. These are safe, secure, and efficient online payment methods.

Our customer support team is here to answer your questions. Ask us anything!

👋 Hi, how can I help?