Giter Club home page Giter Club logo

cartesiangeneticprogramming.jl's People

Contributors

d9w avatar erwanlecarpentier avatar ethanj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cartesiangeneticprogramming.jl's Issues

pybulllet environments don't visualize

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}

ERROR: LoadError: UndefVarError: Game not defined

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

use MicroLogging

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.

Re-work Config

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.

Possibly bug in rgene elements

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.

Setting up with Julia v1.0.0

I'm new to Julia so pardon me if the questions are n00b, but here's the issue:

Problem

  1. Does not include "PaddedViewer" in depencency (fixed by manually changing deps in environment)
  2. running julia dev/CGP/experiments/xor.jl, get back
ERROR: 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.

graph_utils seems to be out of date

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

UndefVarError: Game 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.

Frame skip might not be required (already handled in ALE)

In the Atari experiment there's a probablistic action repeat (frame skip?):

https://github.com/d9w/CGP.jl/blob/d82cc4b48c9c957a971bddea8f8da916824f231f/experiments/atari.jl#L23-L25

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.

function graph improvements

  • names are truncated based on final "_", should be first
  • show x, y inputs in different colors
  • make self-references a loop

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.