Discussion:
[Proj 4] Question 1 Clarification
(too old to reply)
Daniel Ritchie
2008-10-25 18:22:04 UTC
Permalink
Those "two things" you mentioned are actually one and the same. You want
to go about finding the distribution over ghost locations given some
observations. If you have this, you already have enough information to
find the probability that a ghost is at any given square on the grid--in
fact, the framework takes care of this for you.
Hello all,
Bouncing off the discussion from the previous thread, I'm also a bit confused
about what needs to be done for Question 1. It seems like the question asks for
two things (Posterior distribution over location of a ghost given observation
and probabilities over the grid that the ghost is in a given position) unless
I'm mixing something up which I feel like I most likely am. One of the biggest
things that seems to be throwing me off is if we know which positions the ghost
can possibly be in through getGhostTuples, doesn't that mean those are the only
positions we need to examine and change/update since the ghosts can only be
found there? But, this seems trivial so what am I missing? Any clarification
about this problem will be quite helpful.
- Alan Wong
Adam Jiang
2008-10-25 23:44:54 UTC
Permalink
Think hard about what probability you're trying to get. There isn't really
any summing to be done, there IS a lot of multiplication to be done... Hint:
the game gives you the probability that a particular location is a certain
color given a ghost position. I'd start by trying to figure out what you're
trying to solve and how to solve it in terms of what you're given. If you
can solve that puzzle you'll be 80% done with the question.
Hmm, alright I think I get it now. After playing around with the problem
some
more another question that I have is what we do with the colors we get
back.
For deterministic we always get the right color with probability 1 and for
noisy we get a distribution of colors which sum up to 1. Based off methods
we've learned in class, it seems like we take the sum of products of all
outcomes. However, in this case, wouldn't we end up with a sum equal to
the
number of evidence variables we passed in since for each one we have it
returns
a distribution which will sum up to 1 with
getReadingDistributionGivenGhostTuple()? Sorry if this is another trivial
sounding question but what am I missing now?
- Alan Wong
Post by Daniel Ritchie
Those "two things" you mentioned are actually one and the same. You want
to go about finding the distribution over ghost locations given some
observations. If you have this, you already have enough information to
find the probability that a ghost is at any given square on the grid--in
fact, the framework takes care of this for you.
Hello all,
Bouncing off the discussion from the previous thread, I'm also a bit
confused
Post by Daniel Ritchie
about what needs to be done for Question 1. It seems like the question
asks
for
Post by Daniel Ritchie
two things (Posterior distribution over location of a ghost given
observation
Post by Daniel Ritchie
and probabilities over the grid that the ghost is in a given position)
unless
Post by Daniel Ritchie
I'm mixing something up which I feel like I most likely am. One of the
biggest
Post by Daniel Ritchie
things that seems to be throwing me off is if we know which positions
the
ghost
Post by Daniel Ritchie
can possibly be in through getGhostTuples, doesn't that mean those are
the
only
Post by Daniel Ritchie
positions we need to examine and change/update since the ghosts can only be
found there? But, this seems trivial so what am I missing? Any
clarification
Post by Daniel Ritchie
about this problem will be quite helpful.
- Alan Wong
Adam Jiang
2008-10-26 00:45:26 UTC
Permalink
If you were figuring out the P(color) in general you may do that but that's
not what you're looking for. I'm not quite sure what you're trying to use
the sum of products for otherwise...

If you're trying to say that the probability of a ghost at a location is the
sum of the products of what all the sensors say you might be taking the
wrong approach. Hint: your ghost beliefs are in getInitialDistribution. And
for each ghost position, you want to update it based on the observation.
I figured there would be a lot of multiplication, but by taking advantage
of
the Bayes net structure don't you have to SUM over the PRODUCTS of
outcomes
here i.e] each sensor/color that we get back?
- Alan Wong
Post by Adam Jiang
Think hard about what probability you're trying to get. There isn't really
the game gives you the probability that a particular location is a certain
color given a ghost position. I'd start by trying to figure out what you're
trying to solve and how to solve it in terms of what you're given. If you
can solve that puzzle you'll be 80% done with the question.
Hmm, alright I think I get it now. After playing around with the problem
some
more another question that I have is what we do with the colors we get
back.
For deterministic we always get the right color with probability 1 and for
noisy we get a distribution of colors which sum up to 1. Based off methods
we've learned in class, it seems like we take the sum of products of all
outcomes. However, in this case, wouldn't we end up with a sum equal to
the
number of evidence variables we passed in since for each one we have it
returns
a distribution which will sum up to 1 with
getReadingDistributionGivenGhostTuple()? Sorry if this is another trivial
sounding question but what am I missing now?
- Alan Wong
Post by Daniel Ritchie
Those "two things" you mentioned are actually one and the same. You want
to go about finding the distribution over ghost locations given some
observations. If you have this, you already have enough information to
find the probability that a ghost is at any given square on the grid--in
fact, the framework takes care of this for you.
Hello all,
Bouncing off the discussion from the previous thread, I'm also a bit
confused
Post by Daniel Ritchie
about what needs to be done for Question 1. It seems like the question
asks
for
Post by Daniel Ritchie
two things (Posterior distribution over location of a ghost given
observation
Post by Daniel Ritchie
and probabilities over the grid that the ghost is in a given position)
unless
Post by Daniel Ritchie
I'm mixing something up which I feel like I most likely am. One of the
biggest
Post by Daniel Ritchie
things that seems to be throwing me off is if we know which positions
the
ghost
Post by Daniel Ritchie
can possibly be in through getGhostTuples, doesn't that mean those are
the
only
Post by Daniel Ritchie
positions we need to examine and change/update since the ghosts can only be
found there? But, this seems trivial so what am I missing? Any
clarification
Post by Daniel Ritchie
about this problem will be quite helpful.
- Alan Wong
Daniel Ritchie
2008-10-26 01:09:19 UTC
Permalink
There is no sum. If you haven't yet written down an equation for this
problem using bayes' rule, the chain rule, and the conditional
independences guaranteed by the bayes' net topology of this problem, go
do that--the sooner the better, and definitely before you attempt to
write any code.
Hmm, but as you get more and more sensors as evidence won't you need to take
them into account by finding the sum of products? I get how it could be done
with just one observation/sensor using Bayes rule to flip things around but I
thought as you accumulate more sensors you need to use the sum of products? Is
that the totally incorrect approach?
- Alan Wong
Post by Adam Jiang
If you were figuring out the P(color) in general you may do that but that's
not what you're looking for. I'm not quite sure what you're trying to use
the sum of products for otherwise...
If you're trying to say that the probability of a ghost at a location is the
sum of the products of what all the sensors say you might be taking the
wrong approach. Hint: your ghost beliefs are in getInitialDistribution. And
for each ghost position, you want to update it based on the observation.
I figured there would be a lot of multiplication, but by taking advantage
of
the Bayes net structure don't you have to SUM over the PRODUCTS of
outcomes
here i.e] each sensor/color that we get back?
- Alan Wong
Post by Adam Jiang
Think hard about what probability you're trying to get. There isn't really
the game gives you the probability that a particular location is a certain
color given a ghost position. I'd start by trying to figure out what you're
trying to solve and how to solve it in terms of what you're given. If you
can solve that puzzle you'll be 80% done with the question.
Hmm, alright I think I get it now. After playing around with the problem
some
more another question that I have is what we do with the colors we get
back.
For deterministic we always get the right color with probability 1 and for
noisy we get a distribution of colors which sum up to 1. Based off methods
we've learned in class, it seems like we take the sum of products of all
outcomes. However, in this case, wouldn't we end up with a sum equal to
the
number of evidence variables we passed in since for each one we have it
returns
a distribution which will sum up to 1 with
getReadingDistributionGivenGhostTuple()? Sorry if this is another trivial
sounding question but what am I missing now?
- Alan Wong
Post by Daniel Ritchie
Those "two things" you mentioned are actually one and the same. You want
to go about finding the distribution over ghost locations given some
observations. If you have this, you already have enough information to
find the probability that a ghost is at any given square on the grid--in
fact, the framework takes care of this for you.
Hello all,
Bouncing off the discussion from the previous thread, I'm also a bit
confused
Post by Daniel Ritchie
about what needs to be done for Question 1. It seems like the question
asks
for
Post by Daniel Ritchie
two things (Posterior distribution over location of a ghost given
observation
Post by Daniel Ritchie
and probabilities over the grid that the ghost is in a given position)
unless
Post by Daniel Ritchie
I'm mixing something up which I feel like I most likely am. One of the
biggest
Post by Daniel Ritchie
things that seems to be throwing me off is if we know which positions
the
ghost
Post by Daniel Ritchie
can possibly be in through getGhostTuples, doesn't that mean those are
the
only
Post by Daniel Ritchie
positions we need to examine and change/update since the ghosts can only be
found there? But, this seems trivial so what am I missing? Any
clarification
Post by Daniel Ritchie
about this problem will be quite helpful.
- Alan Wong
Tom Miller
2008-11-05 02:21:53 UTC
Permalink
I'm really beating my head against a wall here, for 2 days. We want P(R
given observations). We have G=ghosts and P(G|R) from game.getX, but i'm
lost on the observations. I don't know where the observation tuples come in.
I know the rules of probability, but don't understand what is wanted. Am I
correct in assuming the chain rule is only used if more than one ghost?
Charles
2008-11-05 05:24:52 UTC
Permalink
R stands for readings, those R's are your observations.
Post by Tom Miller
I'm really beating my head against a wall here, for 2 days. We want P(R
given observations). We have G=ghosts and P(G|R) from game.getX, but
i'm lost on the observations. I don't know where the observation tuples
come in. I know the rules of probability, but don't understand what is
wanted. Am I correct in assuming the chain rule is only used if more
than one ghost?
Charles
2008-11-05 05:24:01 UTC
Permalink
I don't know about no sum. I have used a sum but it was abstracted away
to a call to totalCount() but it's still a sum. My partner and I could
not think of a single way to get the answer without summation.
Unfortunately the solution is also rather slow for 2 ghosts (question
2). Is everyone else's like that or is there a more efficient way?
Post by Daniel Ritchie
There is no sum. If you haven't yet written down an equation for this
problem using bayes' rule, the chain rule, and the conditional
independences guaranteed by the bayes' net topology of this problem, go
do that--the sooner the better, and definitely before you attempt to
write any code.
Hmm, but as you get more and more sensors as evidence won't you need to take
them into account by finding the sum of products? I get how it could be done
with just one observation/sensor using Bayes rule to flip things around but I
thought as you accumulate more sensors you need to use the sum of products? Is
that the totally incorrect approach?
- Alan Wong
Post by Adam Jiang
If you were figuring out the P(color) in general you may do that but
that's not what you're looking for. I'm not quite sure what you're
trying to use the sum of products for otherwise...
If you're trying to say that the probability of a ghost at a location
is the sum of the products of what all the sensors say you might be
taking the wrong approach. Hint: your ghost beliefs are in
getInitialDistribution. And for each ghost position, you want to update
it based on the observation.
I figured there would be a lot of multiplication, but by taking advantage of
the Bayes net structure don't you have to SUM over the PRODUCTS of outcomes
here i.e] each sensor/color that we get back?
- Alan Wong
Post by Adam Jiang
Think hard about what probability you're trying to get. There isn't really
the game gives you the probability that a particular location is a certain
color given a ghost position. I'd start by trying to figure out what you're
trying to solve and how to solve it in terms of what you're given. If you
can solve that puzzle you'll be 80% done with the question.
Hmm, alright I think I get it now. After playing around with the problem
some
more another question that I have is what we do with the colors we get
back.
For deterministic we always get the right color with probability 1 and for
noisy we get a distribution of colors which sum up to 1. Based off methods
we've learned in class, it seems like we take the sum of products of all
outcomes. However, in this case, wouldn't we end up with a sum equal to
the
number of evidence variables we passed in since for each one we have it
returns
a distribution which will sum up to 1 with
getReadingDistributionGivenGhostTuple()? Sorry if this is another trivial
sounding question but what am I missing now?
- Alan Wong
Post by Daniel Ritchie
Those "two things" you mentioned are actually one and the same. You want
to go about finding the distribution over ghost locations given some
observations. If you have this, you already have enough information to
find the probability that a ghost is at any given square on the grid--in
fact, the framework takes care of this for you.
Hello all,
Bouncing off the discussion from the previous thread, I'm also a bit
confused
Post by Daniel Ritchie
about what needs to be done for Question 1. It seems like the question
asks
for
Post by Daniel Ritchie
two things (Posterior distribution over location of a ghost given
observation
Post by Daniel Ritchie
and probabilities over the grid that the ghost is in a given position)
unless
Post by Daniel Ritchie
I'm mixing something up which I feel like I most likely am. One of the
biggest
Post by Daniel Ritchie
things that seems to be throwing me off is if we know which positions
the
ghost
Post by Daniel Ritchie
can possibly be in through getGhostTuples, doesn't that mean those are
the
only
Post by Daniel Ritchie
positions we need to examine and change/update since the ghosts can only be
found there? But, this seems trivial so what am I missing? Any
clarification
Post by Daniel Ritchie
about this problem will be quite helpful.
- Alan Wong
Daniel Duckworth
2008-10-26 03:25:15 UTC
Permalink
Those would be the only positions IF there were only one ghost. What
you have to realize is that ghostTuples are not just the location of a
ghost, they're all permutations of all possible settings of ghosts, ie:
(((0, 0), (0,0)), ((0,0), (0,1)),...) So to find the probability that
there exists a single ghost in one possible board position is another
problem altogether!
Hello all,
Bouncing off the discussion from the previous thread, I'm also a bit confused
about what needs to be done for Question 1. It seems like the question asks for
two things (Posterior distribution over location of a ghost given observation
and probabilities over the grid that the ghost is in a given position) unless
I'm mixing something up which I feel like I most likely am. One of the biggest
things that seems to be throwing me off is if we know which positions the ghost
can possibly be in through getGhostTuples, doesn't that mean those are the only
positions we need to examine and change/update since the ghosts can only be
found there? But, this seems trivial so what am I missing? Any clarification
about this problem will be quite helpful.
- Alan Wong
Loading...