[Cs4800] CS4800 - HW6 question

Karl Lieberherr lieber at ccs.neu.edu
Fri Oct 28 21:54:29 EDT 2011


Hi David:

it is the second. In the HSR playground there are many optimum claims
and therefore we want proposed claims to be new. We don't want that
an avatar can repeat the same claim again and again against the same partner
avatar. This would make the game less interesting.

Of course, by generateRandomClaim you mean to generate an optimum claim.

-- Karl

On Fri, Oct 28, 2011 at 9:13 PM, David Richards <dirich at ccs.neu.edu> wrote:

> Hi Professor,
>
> I have a  quick question about homework 6.  I'm a little confused about the
> propose function:
>
> > Design an algorithm propose:
> > Class: HSRAvatar
> > Input: List<Claim> forbiddenClaims
> > Output: Claim which is optimum and not a forbidden claim.
> >         Optimum means that the claim can neither be strengthened nor
> refuted.
> >         Use the Modified Pascal Triangle to construct optimum claims.
>
> Is the purpose of this function that it take a list of claims, of which
> only one cannot be strengthened or refuted,
> and it returns that one claim?  Take this pseudo-code for example:
>
> > for (Claim claim : forbiddenClaims) {
> >     if (claim.isOptimum()) { return claim; }
> > }
> > return null;
>
> Or is it supposed to be more like the following:
>
> > Claim claim = generateRandomClaim();
> > while (forbiddenClaims.contains(claim)) {
> >     claim = generateRandomClaim();
> > }
> > return claim;
>
> Thanks,
> -David Richards
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the Cs4800 mailing list