Factor graphs: HMM

163 Views Asked by At

A friend of mine and me are struggling for a while now on how to start with this example that we have to work out.


There is a 10x10 map which an agent is randomly placed on. The single tiles of that map are randomly colored. There are 10 colors encoded by the numbers 1 to 10.

All that is given is a vector of observed colors $ \bf{x} = \{ 3,1,..,8 \} $ that the agent reported to us after making 20 steps. He either stays at his current location with a probability of 25% or moves up, down, left or right, where each of these four actions is chosen with a probability of 18.75%.

We are now supposed to implement the sum-product algorithm to find the most likely trajectories and the probabilities of the agent positions on each time step as inferred by the sum-product algorithm.


Unfortunately we don't have a clue how to begin with this. We know how the sum-product algorithm works but we are stuck here on the very beginning.