BECCA on Windows 8.1 64 bit [Set-up and run experience]

21 views
Skip to first unread message

Tapo

unread,
Jan 31, 2016, 5:25:14 PM1/31/16
to BECCA_users
Hello BECCA users, I am Tapo.

I came to know about it a couple of weeks ago, and I was startled.
I am amazed watching this video and started wondering about the possibilities;
supported by a very generic design.

So, I forked the git project and went through the wiki.

I admit, building and seeing a brain in action is my primary motivation and drive towards working on BECCA.

Being the guy who hurries into things (yes I do, when I am excited) and a newbie to Machine Learning,
I totally missed the section which discussed about the versions of tools and components used.

I started by running it on Pycharm IDE and pre-installed Python 3.4, and failed; miserably.
I developed a habit of maintaining logs of my actions; 
especially, when I am not very much sure about what I am doing!
Well, these documented failure steps kept me aligned and finally I ended up running it (partially).

I have compiled the success steps into this file.
And packed all the required components under a google drive zipped file (of size 32 MB).

It contains ->
-- Python setup 2.7.8
-- ".whl" files (py libs like numpy / matplotlib compiled for windows) which are most essential
-- along with a "tosetup_readme.txt" file mentioning the tested system and the setup steps (bug resolution)

I have discussed these set-up bugs with Brandon and they are corrected.

After running benchmark.py, I observed that when the plot is shown, on mouse activity like click or hover in the plot-display-panel,
it causes the plot-window to hangup and finally crash with error "python.exe" not working.
 

Below, I have discussed about the two bugs (OS based) and the probable solution.

Topic : Plot freeze issue on mouse activity

Solution :
Place the following line ->
plt.pause(0.001)

Before the line ->
plt.plot()

wherever "plt.plot()" is used in the project

Running a recursive grep I found them in these files and made changes in all of them ->
-- core/amygdala.py
-- core/ganglia.py
-- worlds/image_1D.py
-- worlds/image_2D.py

The changed section looks somewhat like this (in core/amygdala.py line 158) ->
         plt.pause(0.001) 
plt.plot(self.reward_steps, self.reward_history, color=color, linewidth=linewidth)

Discussion :
It seems that in some systems (due to python version / os) the event handlers go haywire when a plot is constantly updated with data (GUI issue).
The issue we discussed where, on mouse activity the plot freezes, otherwise things run pretty good.
This is because, mouse activity leads to interaction with the plot and the handlers seem to mismanage both plot updation and interaction action.

Adding a "plt.pause()" command lets it wait to handle any detected interaction and then plot the data.

Note that, I have not verified the fact that placing "plt.pause(0.001)" in which of the four mentioned code actually solves the issue.
But I think that placing "plt.pause()" will not affect the overall system apart from a slight delay (I haven't physically quantified it).

These links discuss this in detail :

Another problem which showed up as it started to execute the 2Ds.

Topic : Issue faced while running grid_2D.py

Error : Runtime error -> 
Cannot cast ufunc add output from dtype('float64') to dtype('int32') with casting rule 'same_kind'

Discussion : The issue arises due to numpy incompatibility.

The pre-compiled bundle that I downloaded (from link) and shared on google drive seems to have numpy 1.9 version and BECCA requires 1.6.
I have raised a question on Stack Overflow requesting to share the old compiled libs, but I don't think there is much hope. 
Here is the question link ->
-- http://stackoverflow.com/questions/34960809/where-are-the-older-versions-of-unofficial-compiled-numpy-libraries-for-windows

The gist of the discussion is ->
-- I have to download older numpy / other lib versions and use necessary tools to compile them individually
-- Use anaconda for the setup

The second option looks easier and better. 

So, this is where I stand with BECCA and a bit occupied solving my job assignments.

Going ahead, I would like to discuss about,
-- Setting up BECCA with anaconda
-- Understanding and creating a world; interacting with BECCA
-- Discussing few interesting projects

Do let me know if you are starting with BECCA and facing issues.
And comment if any of the links are broken or inappropriate.

Thanks,
Tapo
Reply all
Reply to author
Forward
0 new messages