class GhostTracker:
  def __init__(self, state, ghostState):
    self.adapter = GhostbustersGameAdapter(state, ghostState)
    self.inference = ExactDynamicInferenceModule(self.adapter)
    self.inference.initialize()
    
  def observe(self, pacPosition, distance):
    return self.inference.observe( (pacPosition, distance) )
    
  def elapseTime(self):
    return self.inference.elapseTime()
    
  def getStateDistribution(self):
    dist = self.inference.getBeliefDistribution()
    c = util.Counter()
    for key, value in dist.items():
      c[key[0]] = value
    return c
 def __init__(self, state, ghostState):
   self.adapter = GhostbustersGameAdapter(state, ghostState)
   self.inference = ExactDynamicInferenceModule(self.adapter)
   self.inference.initialize()