feat: complete q7
This commit is contained in:
parent
cd9629462e
commit
3d47ae1a15
@ -606,7 +606,13 @@ class ExactInference(InferenceModule):
|
||||
current position is known.
|
||||
"""
|
||||
"*** YOUR CODE HERE ***"
|
||||
raiseNotDefined()
|
||||
new_beliefs = DiscreteDistribution()
|
||||
for old_position in self.allPositions:
|
||||
new_positions = self.getPositionDistribution(gameState, old_position)
|
||||
for new_position, prob in new_positions.items():
|
||||
new_beliefs[new_position] += self.beliefs[old_position] * prob
|
||||
self.beliefs = new_beliefs
|
||||
|
||||
"*** END YOUR CODE HERE ***"
|
||||
|
||||
def getBeliefDistribution(self):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user