News for hackers. Stuff that matters.
Re:Playing Atari with Six Neurons by kthejoker2 on Wednesday June 06, 2018 @04:37PM (#17250883)
Re:Playing Atari with Six Neurons by giuse on Wednesday June 06, 2018 @05:08PM (#17251140)
Ruby should be perfectly legible with a Python background, but for any question just ping me on twitter. I would be happy to build a dialog :)
Re:Playing Atari with Six Neurons by mkrum on Wednesday June 06, 2018 @10:24PM (#17252768)
Just curious, why did you pick ruby over python? Personal familiarity?
Re:Playing Atari with Six Neurons by giuse on Thursday June 07, 2018 @05:52PM (#17260610)
Sure, familiarity matters. But I believe in the rational reasons that brought me back to this tool over and over, until I built familiarity indeed :) I posted an overbloated discussion on it on Reddit, feel free to read as little as you need ;) https://www.reddit.com/r/MachineLearning/comments/8p1o8d/r_p...
Re:Playing Atari with Six Neurons by vidarh on Thursday June 07, 2018 @05:18AM (#17254424)
It's particularly interesting that they've chosen to wrap Python using Pycall. I'd love to hear about the tradeoffs of that.
Re:Playing Atari with Six Neurons by giuse on Thursday June 07, 2018 @06:04PM (#17260713)
Sure! It's quite simple: works like a charm. Completely transparent. You `import` with Python-like syntax, and you get a Ruby object that transparently forwards any message (i.e. method calls) to the corresponding Python object on the underlying Python interpreter.

This means that Ruby does not need to know _anything_ about the Python object: whatever you call on the Ruby object is just forwarded to the Python one, and whatever result is passed back to Ruby.

About the overhead, I sincerely do not know; I expected to have some so my code does part of the image pre-processing directly in Python (`narray`) in order to pass a smaller object to Ruby, but besides that I could perceive none -- grain of salt advised, as that was possibly hidden from me because my computation in Ruby was orders of magnitude more complex/time consuming than what was going on on the Python interpreter.

Definitely ping Murata-san either on GitHub https://github.com/mrkn/pycall.rb/ or Twitter `@mrkn`, I will send him a link to this thread so he can contribute if he feels like it. Personally, I am a fan of his work and elegant approach, I owe him for enabling me to keep working in Ruby while everybody publishes code in Python :)

Re:Playing Atari with Six Neurons by vidarh on Friday June 08, 2018 @01:50AM (#17262915)
Sounds great - I also prefer Ruby very strongly, and have tended to avoid Python code because I didn't expect to have an easy way of wrapping it, but will definitively have to play with Pycall.
Re:Playing Atari with Six Neurons by giuse on Tuesday June 12, 2018 @05:10AM (#17291799)
Uhm maybe I should have pointed this out earlier but the algorithms implementation can be found (independent of deep neuroevolution) in my Ruby machine learning workbench repo (in turn imported in DNE): https://github.com/giuse/machine_learning_workbench