GithubHelp home page GithubHelp logo

snowdrop's People

snowdrop's Issues

Support includes in the configuration file

What steps will reproduce the problem?
  - libraries: "include/lib1.nls" "include/lib2.nls"


What is the expected output? What do you see instead?
Support for specifying multiple library files in Netlogo. The generated code 
should result in:
__includes["include/lib1.nls" "include/lib2.nls"]


Original issue reported on code.google.com by [email protected] on 6 Dec 2011 at 3:01

NullPointerException generated by crossover in the leader election example

What steps will reproduce the problem?

java -jar ../dist/MetaCompiler-20120201.jar leader_election.txt


What is the expected output? 

Working example.


What do you see instead?

Exception in thread "main" java.lang.NullPointerException
        at org.epochx.core.CrossoverManager.crossover(CrossoverManager.java:159)
        at org.epochx.core.GenerationManager.generation(GenerationManager.java:224)
        at org.epochx.core.RunManager.run(RunManager.java:174)
        at org.epochx.core.Model.run(Model.java:147)
        at org.epochx.ge.model.GEModel.run(GEModel.java:82)
        at program.MetaCompiler.main(Unknown Source)




Original issue reported on code.google.com by [email protected] on 1 Feb 2012 at 10:09

Epochx exception

What steps will reproduce the problem?
java -jar ../dist/MetaCompiler-20120130.jar syncBFS.txt



What is the expected output? 

Running simulation.



What do you see instead?

Exception in thread "main" java.lang.NoClassDefFoundError: 
org/epochx/life/GenerationListener
Caused by: java.lang.ClassNotFoundException: org.epochx.life.GenerationListener
        at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:334)
Could not find the main class: program.MetaCompiler. Program will exit.


Original issue reported on code.google.com by [email protected] on 1 Feb 2012 at 1:12

Out of memory exception

What steps will reproduce the problem?
1. I use the following configuration file:

simulation_configuration:
        - output_dir: "output/"
        - libraries: "../include/lib1.nls"
        - simulation_length: 200 // The number of steps in a simulation
        - agent_count: 100 // The number of agents used in the simulation
        - population_size: 300 // The number of individual programs in a population
        - generations: 10
        - runs: 1 // The number of runs
        - verbose: no
        - simulations_per_program: 1
        - cores : 16
        - world: 0 100 0 100
        - dump_all_code: yes
global_fields:
        - glowTime constant 5
        - transRange 10
        - roundLength constant 20
agent_fields:
    - mycolor 0
    - clock random[1 20]
    - updateEnabled 0
agent_action_primitives:
        - setClockIf(glowTime)
        //- setUpdateClockFlag(1)
agent_returning_primitives:
        - countLocal(mycolor 10)
agent_static_primitives:

global_static_primitives:
        - begin moveRandomWalk(.1)
        - begin updateNetworkGraph(transRange)
        - begin setUpdateClockFlagAll(0)
        - end updateColor(glowTime)
        - end incrementAgentsClocks(roundLength)

fitness_function: "standard-deviation [clock] of nodes"

2. Run it as: java -Xms4G -Xmx20G -jar ../dist/MetaCompiler-20120117.jar 
firefly_sync.txt


What is the expected output? 

Finish the simulation...

What do you see instead?

After roughly an hour:

Exception in thread "main" java.lang.OutOfMemoryError: PermGen space
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2444)
        at java.lang.Class.privateGetPublicMethods(Class.java:2564)
        at java.lang.Class.privateGetPublicMethods(Class.java:2580)
        at java.lang.Class.privateGetPublicMethods(Class.java:2580)
        at java.lang.Class.getMethods(Class.java:1427)
        at org.nlogo.generator.BytecodeUtils$.getMethods(BytecodeUtils.scala:24)
        at org.nlogo.generator.BytecodeUtils$.isRejiggered(BytecodeUtils.scala:11)
        at org.nlogo.generator.Generator.org$nlogo$generator$Generator$$recurse(Generator.scala:18)
        at org.nlogo.generator.Generator$$anonfun$generate$1.apply(Generator.scala:15)
        at org.nlogo.generator.Generator$$anonfun$generate$1.apply(Generator.scala:15)
        at scala.runtime.BoxedArray.map(BoxedArray.scala:83)
        at org.nlogo.generator.Generator.generate(Generator.scala:15)
        at org.nlogo.compiler.CompilerMain$$anonfun$compile$2.apply(CompilerMain.scala:50)
        at org.nlogo.compiler.CompilerMain$$anonfun$compile$2.apply(CompilerMain.scala:43)
        at scala.Iterator$class.foreach(Iterator.scala:427)
        at scala.collection.mutable.FlatHashTable$$anon$1.foreach(FlatHashTable.scala:113)
        at scala.Iterable$class.foreach(Iterable.scala:256)
        at scala.collection.mutable.HashSet.foreach(HashSet.scala:31)
        at org.nlogo.compiler.CompilerMain$.compile(CompilerMain.scala:43)
        at org.nlogo.compiler.Compiler$.compileProgram(Compiler.scala:20)
        at org.nlogo.headless.HeadlessModelOpener.openFromMap(HeadlessModelOpener.scala:96)
        at org.nlogo.headless.HeadlessWorkspace.openFromSource(HeadlessWorkspace.java:810)
        at program.GEQuorra.doOneTimeExecution(Unknown Source)
        at program.GEQuorra.getFitness(Unknown Source)
        at org.epochx.ge.representation.GECandidateProgram.getFitness(GECandidateProgram.java:307)
        at org.epochx.stats.StatField$11.getStatValue(StatField.java:187)
        at org.epochx.stats.Stats.getStat(Stats.java:128)
        at org.epochx.stats.StatField$18.getStatValue(StatField.java:353)
        at org.epochx.stats.Stats.getStat(Stats.java:128)
        at program.MetaCompiler$1.onGenerationEnd(Unknown Source)
        at org.epochx.life.Life.fireGenerationEndEvent(Life.java:633)





Original issue reported on code.google.com by [email protected] on 17 Jan 2012 at 2:32

Support complex fitness expressions

What steps will reproduce the problem?

fitness_function: "( standard-deviation [clock] of nodes ) + ( 1 / ( 0.0001 + 
standard-deviation globalState ) )"


What is the expected output? 

Working simulation


What do you see instead?

Read configuration file from firefly_sync.txt
Primitive: initGlobalState
Character '+' on line 47 at position 59 is invalid



Original issue reported on code.google.com by [email protected] on 30 Jan 2012 at 10:16

Runtime NullPointerException in the crossover function

What steps will reproduce the problem?
1. The following config.txt file:

simulation_configuration:
        - output_dir: "output/"
        - libraries: "include/lib1.nls"
        - simulation_length: 100 // The number of steps in a simulation
        - population_size: 10 // The number of agents used
        - generation_size: 100 // The number of generations the genetic algorithm should compute in one run
        - runs: 1 // The number of runs
        - simulations_per_program: 1
        - verbose: no
        - simulations_per_program: 2
agent_fields:
        - myColor 0
        - clock random[1 20]
        - glowTime constant 5
        - roundLength constant 20
        - trRange constant 20
        - speed constant 0.1
        - ON_color constant 10
        - OFF_color constant 0
action_primitives:
        - setClock(glowTime)
property_primitives:
        - countNeighborsWithColor(ON_color)
    - countNeighborsWithColor(OFF_color)
static_primitives:
        - begin moveRandomWalk(speed)
        - begin updateNetworkGraph(trRange)
        - end updateColor(glowTime)
        - end incrementAgentsClocks(roundLength)
fitness_function: "standard-deviation [clock] of nodes"

2. The following library ("lib1.nls") (I tested it tested before):

to updateColor [glowTime_]
  ask nodes [
    ifelse clock < glowTime_ [
      set myColor 10
    ] [
      set myColor 0
    ]
  ]
end

to moveRandomWalk [speed_]
  ask nodes [
    right random 360
    forward speed_
  ]
end

to incrementAgentsClocks [roundLength_]
  ask nodes [
    ifelse (clock < roundLength_) [set clock (clock + 1)] [set clock 0]
  ]
end

to setClock [newClock_]

  set clock newClock_

end

to-report countNeighborsWithColor [color_]
  report in-link-neighbors with [myColor = color_]
end

;; updates the network graph
to updateNetworkGraph [transmissionRange_]

  clear-links

  ask nodes [    
    ask nodes in-radius transmissionRange_ [
      if (self != myself) and (not link-neighbor? myself) [ make-edge self myself ]
    ]
  ]
end

;; connects the two nodes
to make-edge [ node1 node2 ]
  ask node1 [ create-link-with node2 ]
end

What is the expected output? What do you see instead?
warnings but got this instead:

NaN         NaN         agent{environment(maxIterations,100)environment(populationSize,10)in
itialize(myColor,0)initialize(clock,random(1,20))initialize(glowTime,5)initializ
e(roundLength,20)initialize(trRange,20)initialize(speed,0.1)initialize(ON_color,
10)initialize(OFF_color,0)}{moveRandomWalk(fSpeed)updateNetworkGraph(iTrRange)if
(AND(GT(iClock,countNeighborsWithColor(iOFF_color)),AND(GT(iClock,countNeighbors
WithColor(iOFF_color)),OR(false,OR(false,OR(false,(false))))))){setClock(iGlowTi
me)}else{setClock(iGlowTime)}if(OR(false,(true))){setClock(iGlowTime)}else{setCl
ock(iGlowTime)}if(OR(false,(false))){setClock(iGlowTime)}else{setClock(iGlowTime
)}setClock(iGlowTime)setClock(iGlowTime)updateColor(iGlowTime)incrementAgentsClo
cks(iRoundLength)}
Dumped in: 
/home/andrei/work/repos/snowdrop/src/ANTLRTest/src/IntegrationTest/output/output
5196805000186032412.nlogo
Exception in thread "main" java.lang.NullPointerException
    at org.epochx.core.CrossoverManager.crossover(CrossoverManager.java:159)
    at org.epochx.core.GenerationManager.generation(GenerationManager.java:224)
    at org.epochx.core.RunManager.run(RunManager.java:174)
    at org.epochx.core.Model.run(Model.java:147)
    at org.epochx.ge.model.GEModel.run(GEModel.java:82)
    at IntegrationTest.main(IntegrationTest.java:350)




Original issue reported on code.google.com by [email protected] on 6 Dec 2011 at 6:38

Parser error

What steps will reproduce the problem?
Used the following config file:

simulation_configuration:
    - output_dir: "output/"
//  - libraries: "include/lib1.nls" "include/lib2.nls" //
    - simulation_length: 100 // The number of steps in a simulation
    - population_size: 1000 // The number of agents used
    - generation_size: 100 // The number of generations the genetic algorithm should compute in one run
    - runs: 1 // The number of runs
    - simulations_per_program: 1
    - verbose: no
    - simulations_per_program: 2
agent_fields:
        - color 0
        - clock random[1 20]
        - glowTime constant 5
action_primitives:
        - setProperty(clock glowTime)
property_primitives:
        - countLocal(color 10)
static_primitives:
    - begin move(.1)
    - end updateColor()
    - end incrementAgentsClocks()
fitness_function: "standard-deviation clock of nodes"


What is the expected output? What do you see instead?

Read configuration file from config2.txt
Folder: /tmp/Quorra3448039378651463160
warning(200): /tmp/Quorra3448039378651463160/Quorra.g:72:2: 
Decision can match input such as "ID '(' 'i0' ',' 'i0' ')'" using multiple 
alternatives: 1, 3

As a result, alternative(s) 3 were disabled for that input
error(201): /tmp/Quorra3448039378651463160/Quorra.g:72:2: The following 
alternatives can never be matched: 3

warning(200): /tmp/Quorra3448039378651463160/Quorra.g:98:2: 
Decision can match input such as "ID '(' 'i0' ',' 'i0' ')'" using multiple 
alternatives: 1, 3

As a result, alternative(s) 3 were disabled for that input
error(201): /tmp/Quorra3448039378651463160/Quorra.g:98:2: The following 
alternatives can never be matched: 3

java.io.FileNotFoundException: 
/tmp/Quorra3448039378651463160/output/Quorra.tokens (No such file or directory)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:137)
    at GEQuorra.copyFiles(GEQuorra.java:266)
    at GEQuorra.<init>(GEQuorra.java:216)
    at IntegrationTest.main(IntegrationTest.java:311)
RUN ENDED

Original issue reported on code.google.com by [email protected] on 6 Dec 2011 at 2:54

We need a way to specify the initial properties of the agents for a given simulation

Why is the new feature important:

We need a way to specify the initial properties of the agents for a given 
simulation. Right now the "setup" function has a default template where all the 
agents(nodes) are placed randomly in the simulation are. I need to be able to 
manually specify what is happening with the agents at the beginning of the 
simulation. For example I would like to manually place them at given positions, 
make some connections between them etc.

Describe the new feature:

Support the following syntax:

init_actions:
    - setupNodePositions("circle") //example function that gets executed at the beginning of the simulation

Note: You should only create a number of agents equal to the specified value 
and leave the user setup their state, connections, placement etc.

Original issue reported on code.google.com by [email protected] on 19 Jan 2012 at 5:26

Support for specifying the scope of a function and fields: observer(global) and agent

Why is the new feature important:
Right now all functions are called in the agent scope. The current 
code-generation works as:

to go
  ask nodes [
    function 1 //if function 1 is intended to run at the beginning and already has an "ask nodes". Execution results in an error always.
    function 2 //agent-level function
    ...
    function n // agent-level function
  ]
]

Describe the new feature:
The scope of the fields and functions should be specified by the user:

global_fields: // global fields
        - transRange constant 10
        - roundLength constant 20
        - glowTime constant 5
agent_fields: // agent (local) fields
        - mycolor 0
        - clock random[1 20]
agent_action_primitives:
        - setClock(glowTime)
agent_returning_primitives:
        - countLocal(mycolor 10)
observer_primitives: // or global primitives: should not be enclosed in "ask 
nodes" 
    - begin moveRandomWalk(.1)
    - begin updateNetworkGraph(transRange)
    - end updateColor(glowTime)
    - end incrementAgentsClocks(roundLength)

This results into:

globals [
      transRange
      roundLength
      glowTime
]

breed [nodes node]

nodes-own [
      mycolor
      clock
]

to setup
     set transRange 10
     set roundLength 20
     set glowTime 5

     create-nodes [
        set mycolor 0
        set clock 1 + random 19
     ]

end

to go
    //handle max tick
    begin moveRandomWalk(.1)  // observer function call
    begin updateNetworkGraph(transRange) // observer function call

    ask nodes [ // agent-scope functions - here you play with all possible combinations
        setClock(glowTime)
        countLocal(mycolor 10)
        ....
    ]

    end updateColor(glowTime) // observer function call
    end incrementAgentsClocks(roundLength) // observer function call
end

Original issue reported on code.google.com by [email protected] on 12 Dec 2011 at 11:31

Support list-type global/agent variables

What steps will reproduce the problem?
global_fields:
        - globalState []


What is the expected output? 

Simulation running


What do you see instead?

Parsing the configuration file failed, error on line: 19 char: 16




Original issue reported on code.google.com by [email protected] on 30 Jan 2012 at 9:25

Write the name of the feature request

Why is the new feature important:
Give nice output to the user

Describe the new feature:
In case of all the programs executed in one generation fail, please exit the 
program nicely.

Original issue reported on code.google.com by [email protected] on 9 Dec 2011 at 4:21

Remove trivial logical conditions that evaluate to false/true always

What steps will reproduce the problem?
1. Run the metacompiler with config3 for example
2. check intermediate or the final solution
3. look for statements such as: if (false) and (true) that always evaluate to 
either true or false.

What is the expected output? 
I would except to see logical conditions that are not trivial, for example by 
evaluating agent fields or more intricate conditions.

What do you see instead?
Logical expressions that are trivial.


Original issue reported on code.google.com by [email protected] on 12 Jan 2012 at 1:45

[fatal] rule assignment has non-LL(*) decision

What steps will reproduce the problem?

1. Run the following command:
java -jar ../dist/MetaCompiler-20120207.jar leader_election.txt

2. Use the following config file:

simulation_configuration:
        - output_dir: "output/"
        - libraries: "../include/lib3.nls"
        - simulation_length: 200 // The number of steps in a simulation
        - agent_count: 10 // The number of agents used in the simulation
        - population_size: 300 // The number of individual programs in a population
        - generations: 30
        - runs: 1 // The number of runs
        - verbose: no
        - simulations_per_program: 16
        //- cores : 16
        - world: 0 100 0 100
        - dump_all_code: yes
        - expansion_generations: 2

global_fields:
        - nodeCount 10

agent_fields:
        - id -1
        - volatile isLeader true
        - inMsg -1
        - outMsg -1

initialization_primitives:
        - setupNodePositionsCircle(nodeCount)
        - updateNetworkGraphDirected()
        - initNodeStates()

agent_action_primitives:
        - sendPacket()
        - forwardPacket()
        - sendMyID()
        - setAsLeader()

agent_returning_primitives:
        - boolean isInMsgHigher()
        - boolean isInMsgEqual()

agent_static_primitives:

global_static_primitives:

fitness_function: "getFitness"


What is the expected output? 

working simulation


What do you see instead?

Folder: /tmp/Quorra4434995480949531653
error(211): /tmp/Quorra4434995480949531653/Quorra.g:228:2: [fatal] rule 
assignment has non-LL(*) decision due to recursive rule invocations reachable 
from alts 5,6.  Resolve by left-factoring or using syntactic predicates or 
using backtrack=true option.
java.lang.NullPointerException
        at program.GEQuorra.copyFilesFromJar(Unknown Source)
        at program.GEQuorra.copyFiles(Unknown Source)
        at program.GEQuorra.<init>(Unknown Source)
        at program.MetaCompiler.main(Unknown Source)
RUN ENDED



Original issue reported on code.google.com by [email protected] on 7 Feb 2012 at 1:30

After the execution has finished evaluating all the generations/runs the program does not exit

What steps will reproduce the problem?
1. run the MetaCompiler on config3 
2. wait for the simulation to finish


What is the expected output? 
A nice exit after the end of the execution maybe with a nice message: all done 
check yyy.nlogo file for the generated code.


What do you see instead?
The program waits for the user to stop it.


Original issue reported on code.google.com by [email protected] on 12 Jan 2012 at 1:41

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.