avida-ed-library-build/docs/AvidaSpacialResoureAnimatio...

216 lines
11 KiB
Plaintext
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This worked for me to set up Matt's ResouceNotebook. I did have python already installed.
Quickest start:
Go to the directory where you'd like to install the repository. Make sure that there is not already a directory called AvidaResourceNotebook present. Then paste and run this in the terminal:
git clone https://github.com/ruppmatt/AvidaResourceNotebook && cd AvidaResourceNotebook && git clone https://github.com/devosoft/avida && cd avida && ./build_avida && cd .. && virtualenv -p `which python3` venv && . venv/bin/activate && pip install -r requirements.txt && ln -s ../avida/cbuild/work/avida default_config/avida && cd default_config && ./avida && cd ..
At that point you can launch the notebook by:
jupyter notebook
————————————————————————————————————————————————————————————————————————————————————————————
Avida resources animations
————————————————————————————————————————————————————————————————————————————————————————————
To build avida go to avida-projects/avida and run
./build_avida
folder structure for this project
avida-projects/
resources/
avida/ soft link to avida under work in avida folder below
venv/
avida/
cbuiid/
work/
avida
*.cfg
*.org
to set up softlink go to the resources/avida folder
ln -s ../../avida/cbuild/work/avida .
cp ../../avida/cbuild/work/*.cfg .
cp ../../avida/cbuild/work/default-heads.org .
——————————————————————————
Files: in general
——————————————————————————
analyze.cfg - for analyze mode (avdia -a) can be blank, but needs to exist
utility to analyze after the fact. can be blank, but must exist.
avida.cfg - global configuration
environment.cfg
eventts.cfg
instset-heads.cfg - instruction set list
default-head.org default ancestor
not using the following so we removed them
>rm instset-heads-sex.cfg instset-transsmt.cfg
————————————————————————————————————————————————————————————————————————————————————————————
Getting Jupyter on Computer
————————————————————————————————————————————————————————————————————————————————————————————
Im putting this in a folder called avida-projects
Create virtual environment by going to the folder where the virtual environment will be crated and running:
>virtualenv -p /Library/Frameworks/Python.framework/Versions/3.6/bin/python3 venv
Then activate the virtual environment
>source venv/bin/activate
path for python3 might be different on a different computer.
Matt then supplied requirements.txt file that goes in the avida-stuff folder
So then in the same folder run
>pip install -r requirements.txt
Matt also provided Animate Spatial Resources.ipynb
————————————————————————————————————————————————————————————————————————————————————————————
to run jupyter python notebook
————————————————————————————————————————————————————————————————————————————————————————————
activate the virtual environment if that has not been done already
>source venv/bin/activate
python -m jupyter notebook
————————————————————————————————————————————————————————————————————————————————————————————
In the Notebook
————————————————————————————————————————————————————————————————————————————————————————————
TO run: In the Cells dropdown menu, Click “Run Cells”
or <control><enter> to run the cell that one is currently in
In [ ] beside the cell gives some status information
empty = never executed
[#] what order it was executed (such as [1]
[*} executing or about to be executed
To start clean use the Kernel menu
python is single threaded
- interupt will stop the kernel (stop running)
-
——————————————————————————
Command Mode:
——————————————————————————
When the vertical line on the left is blue, it is in command mode
h: gives some command listings
<esc> got me into command mode
——————————————————————————
Typing Mode
——————————————————————————
The vertical line on the left is green
clicking in the cell put it in this mode.
————————————————————————————————————————————————————————————————————————————————————————————
Test to see that avida runs
————————————————————————————————————————————————————————————————————————————————————————————
go to avida-projects/resources/avida
>./avida
to clear the data folder (output created when running avida)
>rm -rf data
————————————————————————————————————————————————————————————————————————————————————————————
First Experiment with one non-reproducing organism and let resources flow
————————————————————————————————————————————————————————————————————————————————————————————
Files
analyze.cfg - for analyze mode (avdia -a) can be blank, but needs to exist
avida.cfg -
disable mutations
disable death
environment.cfg
eventts.cfg
only inject
printSpatial Resources
Exit
instset-heads.cfg - (add nop-x to end)
default-head.org default ancestor
replace
h-divide w/ nop-x
————————————————————————————————————————————————————————————————————————————————————————————
vim notes
————————————————————————————————————————————————————————————————————————————————————————————
vim cheatsheet on line to find more help on vim
vim filename
<esc> put in command mode
in commmand mode
G - puts at end of file
gg - goes to the top
o - opens an new line below and goes into insert mode
O - opens a new line above the current line and goes into insert mode
i - goes into insert mode
:wq - write quit the colon is important
R - replace mode
0 - go to the start of the line
$ - go to the end of the line
/ - begin search process
:nohls to get rid of highlighting from search
:19 jumps to line 19 for example
————————————————————————————————————————————————————————————————————————————————————————————
https://docs.google.com/spreadsheets/d/1ZS9OT1Om0PYd_ePamXXgr1MhGPrC7ZcvP-7rUCqq7Gs/edit#gid=0
————————————————————————————————————————————————————————————————————————————————————————————
Asking Students about Nature of Science
“Science and the Citezin”
Nature and Process of Science”
General Education at the college level - Utah State regional campus (20 students)
Mike will interview over Zoom in December
how does this fit into experimental design.
Nature and Practice of Science.
————————————————————————————————————————————————————————————————————————————————————————————
git reset --hard to revert back to last clone commit or pull or clone
git reset --hard origin/master to pull to latest and erase local changes.
origin is the name of the remote (git hub) branch
start virtual environment
. venv/bin/activate
————————————————————————————————————————————————————————————————————————————————————————————
Info about how the python notebook works.
Currently developing on avidares
this is a package because it has a file called __init__.py
not full, because there is no setup.py file that would let .pip install it (part of the Easy_setup)
avidares.SingleExperiment is getting SingleExperiment is module (file) withing the package avidares
classes in SingleExperiment that mostly use
ResourceExperiment.
ResourceExperimentAnimation
classes in FactoredExperiment that mostly use
ResourceFactoredExperiment
ResourceFactoredExperimentIterator
ResourceFactoredExperimentAnimation