d9w / cartesiangeneticprogramming.jl Goto Github PK
View Code? Open in Web Editor NEWCartesian Genetic Programming for Julia
License: Other
Cartesian Genetic Programming for Julia
License: Other
This may be an issue in PyCall.jl. Normally env[:render] returns true and displays the environment (for example, for env = gym.make("CartPole-v0")
, but for pybullet envs this doesn't work:
julia> env[:render](mode="human")
0-element Array{Float64,1}
Add parallel evaluation to oneplus, GA
julia experiments/atari.jl --id boxing
WARNING: Method definition info(Any...) in module Base at util.jl:534 overwritten in module Logging at /home/mostafa/.julia/v0.6/Logging/src/Logging.jl:115.
WARNING: Method definition warn(Any...) in module Base at util.jl:589 overwritten in module Logging at /home/mostafa/.julia/v0.6/Logging/src/Logging.jl:115.
ERROR: LoadError: UndefVarError: Game not defined
Stacktrace:
[1] get_params(::Dict{String,Any}) at /home/mostafa/CGP.jl/experiments/atari.jl:71
[2] include_from_node1(::String) at ./loading.jl:576
[3] include(::String) at ./sysimg.jl:14
[4] process_options(::Base.JLOptions) at ./client.jl:305
[5] _start() at ./client.jl:371
while loading /home/mostafa/CGP.jl/experiments/atari.jl, in expression starting on line 113
aside:
i already tried that #8
MicroLogging.jl will be used in 0.7, also fixes the warnings from Logging.jl:
WARNING: Method definition warn(Any...) in module Base at util.jl:589 overwritten in module Logging at /home/d9w/.julia/v0.6/Logging/src/Logging.jl:115.
Config as a submodule introduces a lot of complications. A mutable struct might be sufficient, if it doesn't drastically decrease performance. A dict could also work.
In relation to the Atari experiment, I'm trying to understand the structure of rgenes
in cgp.jl. I hope that I'm looking at right file for that experiment.
I thought the 1st element of rgenes
is the function. The only line that looks relevant to me is https://github.com/d9w/CGP.jl/blob/master/src/chromosomes/cgp.jl#L34 but that's using rgenes[:, 3]
. I guess my question is: should that be rgenes[:, 1]
, or have I misunderstood?
I see at https://github.com/d9w/CGP.jl/blob/master/src/chromosomes/cgp.jl#L37 that the parameter is the 4th element. Makes perfect sense to me. And it looks like the 2nd and 3rd element are the x, y node inputs at https://github.com/d9w/CGP.jl/blob/master/src/chromosomes/cgp.jl#L19
Thank you for your help.
I'm new to Julia so pardon me if the questions are n00b, but here's the issue:
deps
in environment)julia dev/CGP/experiments/xor.jl
, get backERROR: LoadError: MethodError: Cannot `convert` an object of type Nothing to an object of type Union{UUID, Bool}
Closest candidates are:
convert(::Type{T}, !Matched::T) where T at essentials.jl:154
Stacktrace:
[1] explicit_manifest_deps_get(::String, ::Base.UUID, ::String) at ./loading.jl:478
[2] manifest_deps_get(::String, ::Base.PkgId, ::String) at ./loading.jl:307
[3] identify_package(::Base.PkgId, ::String) at ./loading.jl:203
[4] identify_package at ./loading.jl:196 [inlined]
[5] require(::Module, ::Symbol) at ./loading.jl:812
[6] include at ./boot.jl:317 [inlined]
[7] include_relative(::Module, ::String) at ./loading.jl:1038
[8] include(::Module, ::String) at ./sysimg.jl:29
[9] top-level scope at none:2
[10] eval at ./boot.jl:319 [inlined]
[11] eval(::Expr) at ./client.jl:389
[12] top-level scope at ./none:3
in expression starting at /home/tingkailiu/.julia/dev/CGP/src/CGP.jl:4
ERROR: LoadError: Failed to precompile CGP [4fd9c4f4-07f5-549d-bd68-3a67ae5bbbb9] to /home/tingkailiu/.julia/compiled/v1.0/CGP/0AjpJ.ji.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] macro expansion at ./logging.jl:313 [inlined]
[3] compilecache(::Base.PkgId, ::String) at ./loading.jl:1184
[4] _require(::Base.PkgId) at ./logging.jl:311
[5] require(::Base.PkgId) at ./loading.jl:852
[6] macro expansion at ./logging.jl:311 [inlined]
[7] require(::Module, ::Symbol) at ./loading.jl:834
[8] include at ./boot.jl:317 [inlined]
[9] include_relative(::Module, ::String) at ./loading.jl:1038
[10] include(::Module, ::String) at ./sysimg.jl:29
[11] exec_options(::Base.JLOptions) at ./client.jl:229
[12] _start() at ./client.jl:421
in expression starting at /home/tingkailiu/.julia/dev/CGP/experiments/xor.jl:1
Thanks for open-sourcing this code, been meaning to trying out the algorithms in the recent Atari paper for a while.
add weights to nodes, activation functions etc?
http://www.cartesiangp.co.uk/resources.html gives me "404 Not Found".
I wanted some way to visualize the graph and noticed graphs/graph_utils.jl which seems to have been the way graphs were visualized in the past. However, it seems to be out of date.
Had to add: using Printf in order for @sprintf to work.
Also notice that Chromosome is not defined anywhere:
ERROR: LoadError: UndefVarError: Chromosome not defined
Hello - thank you for sharing this project: very cool!
This issue is almost certainly my problem, but pointers would be appreciated.
I've worked through the examples in the readme (xor, etc) and they all work great. For the Atari experiments I'm hitting:
$ julia experiments/atari.jl
WARNING: Method definition info(Any...) in module Base at util.jl:534 overwritten in module Logging at ~/julia/v0.6/Logging/src/Logging.jl:115.
WARNING: Method definition warn(Any...) in module Base at util.jl:589 overwritten in module Logging at ~/.julia/v0.6/Logging/src/Logging.jl:115.
ERROR: LoadError: UndefVarError: Game not defined
Stacktrace:
[1] get_params(::Dict{String,Any}) at CGP.jl/experiments/atari.jl:71
[2] include_from_node1(::String) at ./loading.jl:576
[3] include(::String) at ./sysimg.jl:14
[4] process_options(::Base.JLOptions) at ./client.jl:305
[5] _start() at ./client.jl:371
I'm on MacOS, I have Julia 0.6.4 installed, and I've run:
Pkg.add("ArcadeLearningEnvironment")
I assume I'm missing another step.
In the Atari experiment there's a probablistic action repeat (frame skip?):
My reading of this is that the behaviour (or something very similar) is enabled by default in ALE (since 0.5):
When you call self.ale.act(a) for some action a, the action a will be executed right away
with a probability (1 - p), otherwise, the action that was previously
executed will be executed again. The default value for p right now is 0.25.
^^ from: Farama-Foundation/Arcade-Learning-Environment#166 (comment)
I assume it's safe to remove this test from the code (unless there's an ale.cfg in place to disable the default ALE behaviour).
Apologies in advance if I've mised the point :-/ ...still learning.
Some kind of evolution algorithm:
https://github.com/S6Regen/Thunderbird
There is a paper on the internet "Continuous Gray code optimization" that describes the algorithm used.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.