[Cs5500] Fwd: [Cs4800] Home of your avatar is ready : Helping users

Karl Lieberherr lieber at ccs.neu.edu
Thu Nov 3 12:57:57 EDT 2011


Now we need to set up a systematic technique to get such questions answered.

I will forward those messages to Srinivas and the Navi team and to the
grader for Algorithms.

Is this a good plan? The first who sees the question and has time to answer
it goes ahead and cc's all the other.

David's message suggests improvements to the Avatar Designer Guide.

I need you to respond to those technical set-up questions.

-- Karl

---------- Forwarded message ----------
From: David Richards <dirich at ccs.neu.edu>
Date: Thu, Nov 3, 2011 at 12:07 PM
Subject: Re: [Cs4800] Home of your avatar is ready
To: Karl Lieberherr <lieber at ccs.neu.edu>


Hi Professor,

I'm having some problems getting my avatar ready.
I tried building the Baby Avatar just to make sure I knew what I was doing.

When I first tried to generate the java files I got the following error:
> Davids-Macbook:GenericSCG david$ java -cp
.:demeterf.jar:hamcrest-all-1.3.0RC2.jar demeterf
./src/hsr/BabyAvatar/hsrAvatar.cd ./src/hsr/BabyAvatar/hsrAvatar.beh src
>
>                  ?------------------------------?
>                  |         DemeterF Java        |
>                  |          4/15/2011          |
>                  ?------------------------------?
>
>  ** Generating Classes...
>      [HSRAvatar, ]
> 112, ** Generating Parser...
>  ** Running JavaCC...
>
>
>  !! JavaCC Errors:
>
>     bash: javacc: command not found
>

I was able to fix this by downloading javacc and adding it to my path, but
this wasn't listed anywhere in the instructions.

After that I realized that the domain hadn't been generated, and there were
no instructions to do that.  So I ran
the following to generate the domain:
> Davids-Macbook:GenericSCG david$ java -cp
.:demeterf.jar:hamcrest-all-1.3.0RC2.jar demeterf ./src/hsr/hsrDomain.cd
./src/hsr/hsrDomain.beh src
>                  ?------------------------------?
>                  |         DemeterF Java        |
>                  |          4/15/2011          |
>                  ?------------------------------?
>
>  ** Generating Classes...
>      [HSRInstance, HSRSolution, Simple, Compound, HSRInstanceSet,
HSRDomain, HSRConfig, ]
> 86, ** Generating Parser...
>  ** Running JavaCC...
>  ** Finished [1.62 sec.]

After having done this, I tried to compile the code by using the ant
command as instructed in the guide.
Unfortunately this produced a large number of errors: it appears that the
domain generation didn't generate
the accessor methods (such as getN() and getK() on the HSRInstance class).
 The errors are listed at the
end of this e-mail.

Could you advise on what I'm doing wrong?

Thanks,
-David Richards

> Davids-Macbook:GenericSCG david$ ant
> Buildfile: /Users/david/Desktop/SCG -
SourceCode_JavaDoc/GenericSCG/build.xml
>
> build:
>     [javac] Compiling 14 source files to /Users/david/Desktop/SCG -
SourceCode_JavaDoc/GenericSCG/bin
>     [javac] /Users/david/Desktop/SCG -
SourceCode_JavaDoc/GenericSCG/src/hsr/HSRSolution.java:38: cannot find
symbol
>     [javac] symbol  : method getYes()
>     [javac] location: class hsr.Compound
>     [javac]                   depth =
Math.max(((Compound)this).getYes().findDepth(),
((Compound)this).getNo().findDepth()) +1;
>     [javac]                                                    ^
>     [javac] /Users/david/Desktop/SCG -
SourceCode_JavaDoc/GenericSCG/src/hsr/HSRSolution.java:38: cannot find
symbol
>     [javac] symbol  : method getNo()
>     [javac] location: class hsr.Compound
>     [javac]                   depth =
Math.max(((Compound)this).getYes().findDepth(),
((Compound)this).getNo().findDepth()) +1;
>     [javac]
                            ^
>     [javac] /Users/david/Desktop/SCG -
SourceCode_JavaDoc/GenericSCG/src/hsr/HSRSolution.java:38: operator +
cannot be applied to <any>,int
>     [javac]                   depth =
Math.max(((Compound)this).getYes().findDepth(),
((Compound)this).getNo().findDepth()) +1;
>     [javac]                                   ^
>     [javac] /Users/david/Desktop/SCG -
SourceCode_JavaDoc/GenericSCG/src/hsr/HSRSolution.java:38: incompatible
types
>     [javac] found   : <nulltype>
>     [javac] required: int
>     [javac]                   depth =
Math.max(((Compound)this).getYes().findDepth(),
((Compound)this).getNo().findDepth()) +1;
>     [javac]
                                                  ^
>     [javac] /Users/david/Desktop/SCG -
SourceCode_JavaDoc/GenericSCG/src/hsr/HSRInstance.java:61: cannot find
symbol
>     [javac] symbol  : method getYes()
>     [javac] location: class hsr.Compound
>     [javac]                           return
lessThanEqualKBranches(((Compound) s).getYes(), jarsBroken +1) &&
>     [javac]
        ^
>     [javac] /Users/david/Desktop/SCG -
SourceCode_JavaDoc/GenericSCG/src/hsr/HSRInstance.java:62: cannot find
symbol
>     [javac] symbol  : method getNo()
>     [javac] location: class hsr.Compound
>     [javac]
lessThanEqualKBranches(((Compound) s).getNo(), jarsBroken);
>     [javac]
         ^
>     [javac] /Users/david/Desktop/SCG -
SourceCode_JavaDoc/GenericSCG/src/hsr/HSRInstance.java:70: cannot find
symbol
>     [javac] symbol  : method getN()
>     [javac] location: class hsr.HSRInstance
>     [javac]           java.util.List<Integer> internalNodes =
buildIntList(getN());
>     [javac]
 ^
>     [javac] /Users/david/Desktop/SCG -
SourceCode_JavaDoc/GenericSCG/src/hsr/HSRInstance.java:72: cannot find
symbol
>     [javac] symbol  : method getN()
>     [javac] location: class hsr.HSRInstance
>     [javac]           java.util.List<Integer> leaves =
buildIntList(getN());
>     [javac]                                                         ^
>     [javac] /Users/david/Desktop/SCG -
SourceCode_JavaDoc/GenericSCG/src/hsr/HSRInstance.java:86: cannot find
symbol
>     [javac] symbol  : method getQuestion()
>     [javac] location: class hsr.Compound
>     [javac]                   Integer question = new Integer(((Compound)
s).getQuestion());
>     [javac]
 ^
>     [javac] /Users/david/Desktop/SCG -
SourceCode_JavaDoc/GenericSCG/src/hsr/HSRInstance.java:89: cannot find
symbol
>     [javac] symbol  : method getYes()
>     [javac] location: class hsr.Compound
>     [javac]                           return nodesValid(((Compound)
s).getYes(), internalNodes, leaves) &
>     [javac]                                                           ^
>     [javac] /Users/david/Desktop/SCG -
SourceCode_JavaDoc/GenericSCG/src/hsr/HSRInstance.java:90: cannot find
symbol
>     [javac] symbol  : method getNo()
>     [javac] location: class hsr.Compound
>     [javac]
nodesValid(((Compound) s).getNo(), internalNodes, leaves);
>     [javac]
     ^
>     [javac] /Users/david/Desktop/SCG -
SourceCode_JavaDoc/GenericSCG/src/hsr/HSRInstance.java:95: cannot find
symbol
>     [javac] symbol  : method getHighest_safe_rung()
>     [javac] location: class hsr.Simple
>     [javac]                   Integer hsr = new Integer(((Simple)
s).getHighest_safe_rung());
>     [javac]                                                         ^
>     [javac] /Users/david/Desktop/SCG -
SourceCode_JavaDoc/GenericSCG/src/hsr/HSRInstanceSet.java:47: cannot find
symbol
>     [javac] symbol  : method getSingleton()
>     [javac] location: class hsr.HSRInstanceSet
>     [javac]           if(!i.equals(getSingleton())){
>     [javac]                        ^
>     [javac] /Users/david/Desktop/SCG -
SourceCode_JavaDoc/GenericSCG/src/hsr/HSRInstanceSet.java:48: cannot find
symbol
>     [javac] symbol  : method print()
>     [javac] location: class hsr.HSRInstance
>     [javac]                   return new Some<String>("The instance " +
i.print() + " is different from " + getSingleton().print() + ".");
>     [javac]                                                              ^
>     [javac] /Users/david/Desktop/SCG -
SourceCode_JavaDoc/GenericSCG/src/hsr/HSRInstanceSet.java:48: cannot find
symbol
>     [javac] symbol  : method getSingleton()
>     [javac] location: class hsr.HSRInstanceSet
>     [javac]                   return new Some<String>("The instance " +
i.print() + " is different from " + getSingleton().print() + ".");
>     [javac]
                                  ^
>     [javac] /Users/david/Desktop/SCG -
SourceCode_JavaDoc/GenericSCG/src/hsr/HSRInstanceSet.java:55: cannot find
symbol
>     [javac] symbol  : method getSingleton()
>     [javac] location: class hsr.HSRInstanceSet
>     [javac]          HSRInstance i = getSingleton();
>     [javac]                          ^
>     [javac] /Users/david/Desktop/SCG -
SourceCode_JavaDoc/GenericSCG/src/hsr/HSRInstanceSet.java:56: cannot find
symbol
>     [javac] symbol  : method getN()
>     [javac] location: class hsr.HSRInstance
>     [javac]          int n = i.getN();
>     [javac]                   ^
>     [javac] /Users/david/Desktop/SCG -
SourceCode_JavaDoc/GenericSCG/src/hsr/HSRInstanceSet.java:57: cannot find
symbol
>     [javac] symbol  : method getK()
>     [javac] location: class hsr.HSRInstance
>     [javac]          int k = i.getK();
>     [javac]                   ^
>     [javac] 18 errors
>
> BUILD FAILED
> /Users/david/Desktop/SCG - SourceCode_JavaDoc/GenericSCG/build.xml:34:
Compile failed; see the compiler error output for details.
>
> Total time: 1 second

On Nov 3, 2011, at 10:32 AM, Karl Lieberherr wrote:

> The home of your avatar is ready. It is the HSR playground controlled by
the Scientific Community Game Court software.
> You have to knock at the door of the playground and they will let your
avatar in.
> But then it is all on its own and has to fight for survival. The more you
know about algorithms
> and implementing them efficiently and robustly, the more likely it will
survive.
>
>
http://www.ccs.neu.edu/home/lieber/courses/algorithms/cs4800/f11/competitions/source/
>
> The Avatar Designer Guide has been updated and is here:
>
http://www.ccs.neu.edu/home/lieber/courses/algorithms/cs4800/f11/competitions/Avatar%20Designer%20Guide.pdf
>
> The baby avatar is here:
>
http://www.ccs.neu.edu/home/lieber/courses/algorithms/cs4800/f11/competitions/source/SCG_HSR_Source/GenericSCG/src/hsr/BabyAvatar/
>
> Instructions for the warm-up tournament tonight will follow.
>
> Happy algorithmic pummeling,
> -- Karl
>
> PS. Before you let your avatar into the dangerous playground, give it a
hug.
> _______________________________________________
> Cs4800 mailing list
> Cs4800 at lists.ccs.neu.edu
> https://lists.ccs.neu.edu/bin/listinfo/cs4800
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the Cs5500 mailing list