mirror of
https://github.com/RustyRaptor/CS475.git
synced 2026-12-03 15:35:16 -07:00
3.4 KiB
3.4 KiB
CS 475 Assignment #2 - Ziad Arafat
-
<\Sigma, Succ, S_0,G>- Overview
- While we might at first be tempted to treat this problem such that each agent has to search a path towards the other this will increase our branching factor by an entire degree. Instead of being
NwhereNis the max outgoing paths of any city it will becomeN^2- So instead we can just find a route from agent $\alpha$'s starting point to agent $\beta$'s starting point.
- Afterwards we can backtrack (cost/2) + 1 steps and that will give us the path for agent B
- So instead we can just find a route from agent $\alpha$'s starting point to agent $\beta$'s starting point.
- So our formalization will be defined by finding a path from Arad to Vaslui.
- While we might at first be tempted to treat this problem such that each agent has to search a path towards the other this will increase our branching factor by an entire degree. Instead of being
\Sigma: Our set of possible states is defined by the list of cities in which our agent\alphacould reside- let
Xbe a set of all cities in the map.- then
\Sigma=\{x \in X\}
- then
- let
Succ: Our set of all possible successor transitions is defined by moving accross the paths from one city to the next.- Let
Succ=\{x\in \Sigma\times\Sigma\}
- Let
A: our set of possible actions is dependant on what paths are available from a certain city.- If we are in Arad we can move to Zerind, Timisoara, or Sibiu.
- We should only move to nodes we haven't visited yet.
- The structure is
(r, d)whereris the source city anddis the destination city. - Each time we do an action we incur a cost of 1 or increment total steps by 1.
S_0: Our set of starting states is defined by the starting city of agent\alpha, which is Arad.- Let
S_0=\{A\}
- Let
G: our set of goal states is defined by the city in which agent\betaresides, which is vaslui.- Let
G=\{V\}
- Let
- The forward branching factor of our problem is defined by the maximum number of adjacent cities we can have at any state.
- In our case this would be at Bucharest or Sibiu where we have 4 adjacent cities.
- Our Forward Branching factor is $4$
- However it is impossible to reach the state where we have 4 cities that have not been explored yet because you have to explore an adjacent state to reach that state.
- Therefore our final forward branching factor is $3$
- In our problem we are optimizing for number of steps and are ignoring distance cost completely. All costs will be treated as a value of 1.
- Overview
-
Solved Trees
- Depth First
- Breadth First
- Iterative Deepening
- A*
-
For A* search I based my heuristic on a distance tier list.
- I measured the relative distance of all the nodes to Vaslui using a paper and pencil to mark.
- I ordered them from 19 to 0.
- 19 being the furthest node and 0 being Vaslui. When I compute the heuristic value I simple use the level from the list.
- Since all the steps are the same cost to us there is no need to add a g(n).
- The list is as follows 19 to 0 respectively.
- O, A, Z, T, L, D, M, S, C, R, F, P, G, B, N, E, U, H, I, V



