Closed schrum2 closed 7 years ago
Following error when trying to run the new iterative set batch file:
Constructor: public edu.utexas.cs.nn.tasks.microrts.iterativeevolution.Competiti
veEnemySequence()
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: java.lang.Error: Unresolved compilation problem:
Type mismatch: cannot convert from AI to ArrayList
at edu.utexas.cs.nn.tasks.microrts.MicroRTSTask.oneEval(MicroRTSTask.java:216)
at edu.utexas.cs.nn.tasks.NoisyLonerTask.evaluate(NoisyLonerTask.java:103)
at edu.utexas.cs.nn.tasks.LonerTask$EvaluationThread.call(LonerTask.java:92)
at edu.utexas.cs.nn.tasks.LonerTask.evaluateAll(LonerTask.java:207)
at edu.utexas.cs.nn.evolution.mulambda.MuLambda.getNextGeneration(MuLambda.java:359)
at edu.utexas.cs.nn.experiment.evolution.SinglePopulationGenerationalEAExperiment.run(SinglePopulationGenerationalEAExperiment.java:214)
at edu.utexas.cs.nn.MMNEAT.MMNEAT.run(MMNEAT.java:782)
at edu.utexas.cs.nn.MMNEAT.MMNEAT.evolutionaryRun(MMNEAT.java:950)
at edu.utexas.cs.nn.MMNEAT.MMNEAT.main(MMNEAT.java:910)
... 5 more
this has been confirmed fixed! microRTSTask runs fine with growingSet both true and false
Include a boolean command line parameter "microRTSGrowingEnemySet" that treats the incremental enemy sequence differently: Instead of switching between opponents, each "switch" point instead adds yet another enemy agent to the set of opponents.
In this paradigm, one eval/trial counts as facing off against each opponent in the set, so it would make sense to set the number of trials to 1 when evolving with this setting.
I think this issue can be accomplished by placing the call to MicroRTSUtility.oneEval within the oneEval of the MicroRTSTask inside of a loop that changes what ai2 is.
Take care to average scores across the results against the individual opponents in a single trial. Look inside the evaluate method of NoisyLonerTask to see how it averages Pair results from oneEval ... in fact, I'll make a commit on this soon that makes this code easy to use/call from the outside.