Google deepmind q learning setup - command-line

Hi I'm trying to run the deepmind q learning software on my mac. I believe I have all the necessary libraries to run the network. I don't understand however to actually run the "run_cpu" or "run_gpu" command. Ive tried running it in terminal with the file followed by the game name breakout. I.e. "./run_gpu breakout". The github page with the code says that all you need to do is copy the rom from the roms folder but I'm not quite sure what that means/how to do it. The repository can be found here: https://github.com/kuz/DeepMind-Atari-Deep-Q-Learner
I'm sure I'm missing something really really simple here. Here's the terminal print out:
Els-MacBook-Air:DeepMind-Atari-Deep-Q-Learner-master elcapitan$ ./run_gpu breakout
-framework alewrap -game_path /Users/elcapitan/Desktop/DeepMind-Atari-
Deep-Q-Learner-master/roms/ -name DQN3_0_1_breakout_FULL_Y -env breakout -
env_params useRGB=true -agent NeuralQLearner -agent_params
lr=0.00025,ep=1,ep_end=0.1,ep_endt=replay_memory,discount=0.99,hist_len=4,learn_start=50000,replay_memory=1000000,update_freq=4,n_replay=1,network="co
nvnet_atari3",preproc="net_downsample_2x_full_y",state_dim=7056,minibatch_s
ize=32,rescale_r=1,ncols=1,bufferSize=512,valid_size=500,target_q=10000,cli
p_delta=1,min_reward=-1,max_reward=1 -steps 50000000 -eval_freq 250000 -
eval_steps 125000 -prog_freq 10000 -save_freq 125000 -actrep 4 -gpu 0 -
random_starts 30 -pool_frms type="max",size=2 -seed 1 -threads 4
./run_gpu: line 46: qlua: command not found
Sorry if this sounds uber dumb. Anyway I'd appreciate a solution if you have one. Thanks!

You need to install qlua, try
sudo luarocks install qtlua

Related

Program and Run PIC18 with pickit4 on linux

I am on linux ubuntu and target is a PIC18F47J53.
I basically want to program the chip and then let it run, using command lines and using pickit4.
using ipecmd (from mplab x ide v5.45), this is my command:
/opt/microchip/mplabx/v5.45/sys/java/zulu8.40.0.25-ca-fx-jre8.0.222-linux_x64/bin/java -jar /opt/microchip/mplabx/v5.45/mplab_platform/mplab_ipe/ipecmd.jar -TPPK4 /P18F47J53 -M -F"/path_to_myfile.hex" -W
This is my output
DFP Version Used : PIC18F-J_DFP,1.4.41,Microchip
*****************************************************
Connecting to MPLAB PICkit 4...
Currently loaded versions:
Application version............00.06.66
Boot version...................01.00.00
Script version.................00.04.17
Script build number............db473af2f4
Tool pack version .............1.6.961
PICkit 4 is supplying power to the target (3.25 volts).
Target device PIC18F47J53 found.
Device Revision Id = 0x1
*****************************************************
Calculating memory ranges for operation...
Erasing...
The following memory area(s) will be programmed:
program memory: start address = 0x0, end address = 0x3ff
program memory: start address = 0x1fc00, end address = 0x1fff7
configuration memory
Programming/Verify complete
Program Report
30-Jan-2021, 12:54:41
Device Type:PIC18F47J53
Program Succeeded.
Operation Succeeded
All good, and takes about 12 seconds, however, after that the pickit4 turns off the power target, and the pickit LED is BLUE (I guess state "ready")
The main question is how can I let the pickit4 powering the boards? any specific parameter? (I cannot find on the readme.html)
If I use MPLAB X IPE GUI to program, the programming is much quicker (3 or 4 seconds), the pickit LED is YELLOW and the target is left powered on. (I selected "release from reset")
I have tried to get the log out with as many details as possible, but I cannot see the commands sent to the pickit4.
Any idea? thanks
I realize that it's been a while since you asked, but i put the answer here for anyone who needs it. Add -OL to your command line options.

openfoam ./makeParaview

i am currently building openfoam 1912 from source and have some trouble building paraview. I just build Qt and Cmake but as soon as i type ./makeParaview qt-5.9.9 5.6.3i get the following error:
./makeParaView: 64: local: -DWM_DP: bad variable name
./makeParaView: 64: ./makeParaView: -DOPENFOAM: bad variable name
A similar error occurs when i try to make VTK / Adios2. Any idea where i took the wrong turn?
Greetings
Gabbagandalf
The proper solution is related to shell quoting issues
- flag="$(stripCompilerFlags $flag)"
+ flag="$(stripCompilerFlags "$flag")"
but in the meantime you can simply change the shebang to #!/bin/bash - it is more forgiving.
As discussed and resolved in these GitLab ticket-1 and ticket-2:
The issue seems to be Ubuntu related.
Solution:
Prior to execute ./makeParaview, switch to bash:
Change the first line of makeParaView script to #!/bin/bash
sudo dpkg-reconfigure dash
./makeParaView

Maxima does not start on Sierra

I downloaded and installed the latest Ma version of Maxima from source forge. When I try to launch it, I get
“Maxima.app” is damaged and can’t be opened. You should move it to the Trash.
This happens with both available versions, the one with VTK and the one without VTK.
How can I get it running?
I have MacOS 10.12.6
and both versions are here:
https://sourceforge.net/projects/maxima/files/Maxima-MacOS/5.40.0-MacOSX/
Others have run into the same problem. I don't use MacOS so I'm not sure what the problem is. Anyway, take a look at this bug report: #3316: Maxima VTK for Mac 5.40 is corrupt. The person who submitted it reported they got it working by following the advice in the comments.
See also thread 39: https://sourceforge.net/p/maxima/support-requests/39/
This is a really important thread to the larger MacOS community.
I have a MacBook Pro running OS X El Capitan, which is locked down a few versions back from the current MacOS Mojave.
I spent an entire night trying to get every wxMaxima from 5.36 to 5.42 running without success - even compiling from sources.
In desperation I found the thread 39 and entered the line:
(setf sb-impl::default-external-format :utf-8)
into a ~home/.sbclrc file (/Users/myName/.sbclrc). It was only then that the GUI and the Maxima engine could connect and a normal session could be established. Maxima, its maintainers and its users are too important a world resource to be stymied by such an esoteric and non-obvious bug.
A user encountering this bug will first go into the preferences menu and start trying to make sure that the file addresses and port numbers are correct, but experimentation can corrupt these and lead to other problems.
In my case following excerpt from https://sourceforge.net/p/maxima/mailman/message/35910588/ helped:
(0) Double-click the icon of "Terminal.app" in the folder "/Applications/Utilities", then the command-line-user-interface window is opened.
(1) Move the current working directory to the location of the disc image with the command "cd". (e.g. "Downloads" folder)
$ cd $HOME/Downloads
(2) You can check the attribute with the command "ls -l#":
(You will be able to find "com.apple.quarantine" which is the name of the attribute.)
$ ls -l# ./*.dmg
-rw-r--r--# 1 name staff 471227521 6 24 23:17 ./Maxima-5.40.0-VTK-macOS.dmg
com.apple.quarantine 62
(3) Remove the attribute "com.apple.quarantine" with the command "xattr -d com.apple.quarantine ./*.dmg":
$ xattr -d com.apple.quarantine ./Maxima-5.40.0-VTK-macOS.dmg
(4) Verify that the attribute "com.apple.quarantine" was removed:
$ ls -l# ./*.dmg
-rw-r--r-- 1 name staff 471227521 6 24 23:17 ./Maxima-5.40.0-VTK-macOS.dmg
(5) Double-click the icon of the disc image file to open.
After that, you should install Maxima.app into your "Applications" folder ("/Applications"). And you should drag the Launchers icon from the disc image to another place of your filesystem. You can install launchers to anywhere you like.
Then you will be able to launch Maxima with Maxima.app or launchers.

Issue with FFMPEG drawtext

ffmpeg -i /home/mysite/public_html/videos/thankyou/thankyou_1.mp4 -strict -2 -vf
"[in]drawtext=fontfile=/home/mysite/fonts/OswaldFont/Oswald-Bold.ttf: x=450:
y=150: fontsize=152: fontcolor=0xAE0216#1: draw='if(gt(n,40),lt(n,300))':
text='THANK YOU',drawtext=fontfile=/home/mysite/fonts/OswaldFont/Oswald-Bold.ttf:
x=450: y=320: fontsize=200: fontcolor=0xAE0216#1: draw='if(gt(n,50),lt(n,300))':
text='JAMISON'" /home/mysite/public_html/videos/thankyou_2.mp4
When running the above, I'm getting the following. It seems to run properly on other distributions. Not sure where to check next.
[Parsed_drawtext_0 # 0x2835480] Option 'draw' not found
[AVFilterGraph # 0x283f980] Error initializing filter 'drawtext' with args 'fontfile=/home/mysite/fonts/OswaldFont/Oswald-Bold.ttf: x=450: y=150: fontsize=152: fontcolor=0xAE0216#1: draw=if(gt(n,40),lt(n,300)): text=THANK YOU'
Error opening filters!
Additionally, this original command works fine in Ubuntu, but give the seen error when running in centOS.
According the the FFmpeg drawtext filter documentation:
draw
This option does not exist, please see the timeline system
This means you should use timeline editing instead.
To do that replace the draw='...' part of your command with:
enable=if(gt(n\,50)\,lt(n\,300))
You should also check:
FFmpeg versions on each machine. You might have an older version installed on Ubuntu, which supports the draw option, and a newer version on CentOS in which the option was removed.
if the font files exist

Foreman start fails on Windows following Heroku tutorial

I'm following the heroku tutorial for Heroku/Facebook integration (but I suspect this issue has nothing to do with facebook integration) and I got stuck on the stage where I was supposed to start foreman (I've installed the Heroku installbelt for windows, which includes foreman):
> foreman start
gives:
C:/RailsInstaller/Ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:247:in `to_specs': Could not find foreman (>= 0) amongst [POpen4-0.1.4, Platform-0.4.0, ZenTest-4.6.2, abstract-1.0.0, actionm
ailer-3.0.11, actionmailer-3.0.9, actionpack-3.0.11, actionpack-3.0.9, activemodel-3.0.11, activemodel-3.0.9, activerecord-3.0.11, activerecord-3.0.9, activerecord-sqlserver-adapter-3.0.15, activereso
urce-3.0.11, activeresource-3.0.9, activesupport-3.0.11, activesupport-3.0.9, addressable-2.2.6, annotate-2.4.0, arel-2.0.10, autotest-4.4.6, autotest-growl-0.2.16, autotest-rails-pure-4.1.2, autotest
-standalone-4.5.8, builder-2.1.2, bundler-1.0.15, diff-lcs-1.1.3, erubis-2.6.6, factory_girl-1.3.3, factory_girl_rails-1.0, faker-0.3.1, gravatar_image_tag-1.0.0.pre2, heroku-2.14.0, i18n-0.5.0, json-
1.6.1, launchy-2.0.5, mail-2.2.19, mime-types-1.17.2, mime-types-1.16, nokogiri-1.5.0-x86-mingw32, open4-1.1.0, pg-0.11.0-x86-mingw32, polyglot-0.3.3, polyglot-0.3.1, rack-1.2.4, rack-1.2.3, rack-moun
t-0.6.14, rack-test-0.5.7, rails-3.0.11, rails-3.0.9, railties-3.0.11, railties-3.0.9, rake-0.9.2.2, rake-0.8.7, rb-readline-0.4.0, rdoc-3.11, rdoc-3.8, rest-client-1.6.7, rspec-2.6.0, rspec-core-2.6.
4, rspec-expectations-2.6.0, rspec-mocks-2.6.0, rspec-rails-2.6.1, rubygems-update-1.8.11, rubyzip-0.9.4, rubyzip2-2.0.1, spork-0.9.0.rc8-x86-mingw32, sqlite3-1.3.3-x86-mingw32, sqlite3-ruby-1.3.3, te
rm-ansicolor-1.0.7, thor-0.14.6, tiny_tds-0.4.5-x86-mingw32, treetop-1.4.10, treetop-1.4.9, tzinfo-0.3.31, tzinfo-0.3.29, webrat-0.7.1, will_paginate-3.0.pre2, win32-api-1.4.8-x86-mingw32, win32-open3
-0.3.2-x86-mingw32, win32-process-0.6.5, windows-api-0.4.0, windows-pr-1.2.1, zip-2.0.2] (Gem::LoadError)
from C:/RailsInstaller/Ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:256:in `to_spec'
from C:/RailsInstaller/Ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems.rb:1210:in `gem'
from C:/Program Files (x86)/ruby-1.9.3/bin/foreman:18
Since I'm a complete noob in this I'm not sure if my question here is a duplicate for Error on 'foreman start' while following the Python/Flask Heroku tutorial (because it's not quite the same error). If so, does anyone have a method for deploying a development environment on windows (for Heruko, Python, Facebook app)? Or should I use Ubuntu for this?
Thanks
Although this question doesn't seem to be of interest to anyone here (5 views in ~2 hours, 0 answers, 0 comments...), I have found the solution and ready to share it with anyone that will encounter it:
Install the latest ruby from rubyinstaller.org (1.9.3-p194) - Sometimes there is a collision installs of the same version, in my case I've just uninstalled all versions of ruby, but if you already have other application that needs older version then you have to be more careful
Check that your system is default to use this version by invoking ruby -v in command line prompt: and getting ruby 1.9.3p194 (2012-04-20) [i386-mingw32] (you may have to close and re-open cmd, to include the new environment variables)
Still in cmd, invoke:
gem install foreman
gem install taps
now go to your Procfile app (e.g. your heroku example app from the tutorial) and execute foreman start, you should see something like this:
18:23:52 web.1 | started with pid 7212
18:23:54 web.1 | * Running on http://0.0.0.0:5000/
18:23:54 web.1 | * Restarting with reloader
after manually adding the ruby path to my system PATH environment variable (Win 7), it still didn't work.
i had to change the default install path of Heroku from
C:\Program Files(x86)\Heroku
to
C:\Heroku
as it didn't properly handle the space in the path. I also tried C:\PROGRA~2\Heroku\ruby-1.9.2\bin to no avail. I imagine any space-less path will do.
hth