Coder Social home page Coder Social logo

devosoft / avida Goto Github PK

View Code? Open in Web Editor NEW
602.0 71.0 113.0 84.23 MB

Home Page: http://avida.devosoft.org

CMake 0.21% Objective-C 11.53% Objective-C++ 2.81% C++ 60.54% Python 0.98% C 2.27% DTrace 0.01% C# 0.03% Makefile 0.03% Perl 0.19% MATLAB 0.59% HTML 20.30% Shell 0.01% Lex 0.04% Rich Text Format 0.39% Roff 0.06% ASL 0.01% Dockerfile 0.01%
avida

avida's Introduction

Avida   http://avida.devosoft.org/
--------------------------------------------------------------------------------
Digital Evolution Laboratory at Michigan State University
(http://devolab.msu.edu)


The top-level repository/distribution of Avida consists of multiple submodules.


I.   REQUIREMENTS
II.  GETTING STARTED
III. CMAKE CONFIGURATION OPTIONS
IV.  CONFIGURING THE CMAKE BUILD
V.   RUNNING CONSISTENCY TESTS
VI.  DOCUMENTATION



I. REQUIREMENTS
--------------------------------------------------------------------------------

General System Requirements

  avida:
   - CMake 2.6.x or greater (http://www.cmake.org/)
   - C++ Compiler and Make system supported by CMake


Additional Requirements for Specific Targets

  avida-viewer (on Linux/Unix Platforms):
   - ncurses

  avida-viewer/Avida.exe (on Windows using included Visual Studio Project):
   - Visual Studio 2008 or greater


  run_tests (testrunner):
   - python 2.6 or greater


  Mac OS X Development (using included Xcode Workspace and Projects):
   - Xcode 4


II. GETTING STARTED
--------------------------------------------------------------------------------

Avida depends on some other libraries for compilation, so before proceeding, be
sure you've downloaded them with the following commands:

$ cd avida
$ git submodule init
$ git submodule update


Building Avida on Linux/Unix Platforms (including Mac OS X):

  To compile and install Avida, using default settings run:
  $ ./build_avida

  By default, you will get an optimized version of the code, as well as the
  ncurses avida-viewer. The installation goes into a directory called 'work'
  that is created in a subdirectory named 'cbuild' directory.  See below how to
  change that.


Building Avida on Windows:

  Open CMake, then select the Avida source code directory (containing
  CMakeLists.txt) and a desired output directory.  Click the configure button.
  In the options panel you MUST turn AVD_GUI_NCURSES 'Off'.  Click the
  configure button again.  You should now be able to press the generate button.
  Open the Visual Studio project generated by CMake in the selected target
  directory.  In Visual Studio select the desired build mode (the default is
  generally 'Debug', 'Release' is recommended).  Build the 'All Build' target.


III. CMAKE CONFIGURATION OPTIONS
--------------------------------------------------------------------------------

Here are the main options available when configuring and building
Avida with cmake :

AVD_CMDLINE
 -  This is a BOOL, either ON or OFF, to enable building interface-less Avida
 ON by default.

AVD_GUI_NCURSES
 -  This is a BOOL, either ON or OFF, to enable building Avida console interface
 ON by default.

AVD_UNIT_TESTS
 -  This is a BOOL, either ON or OFF, to enable building unit test suites
 OFF by default.

CMAKE_BUILD_TYPE
 -  This is a STRING, one of "None", "Debug", "Release", "RelWithDebInfo", 
    "MinSizeRel", to vary optimization levels and debugging information
 "Release" by default.


AVD_GUI_PROTOTYPE_TEXT
 -  This is a BOOL, either ON or OFF, to enable building the prototype ncurses
    THIS IS EXPERIMENTAL AND MAY NOT BUILD!
 OFF by default.


IV. CONFIGURING THE CMAKE BUILD
--------------------------------------------------------------------------------

The following directions pertain to Linux/Unix usage of CMake.  Windows users
should see CMake documentation for using the GUI on Windows. There are three
ways by which you can set the various options.


For a simple 'gui' like interface, from the build directory run:
$ ccmake ../

Pressing 'c' will configure 
Pressing 'g' will generate the make files and exit


If you'd like to be prompted with questions for each option, execute the
following from the build directory:
$ cmake -i ../


From the command-line option, the cmake option -D allows setting Avida
configuration options with the following syntax:
-D<variable name>:<type>=<value>

To completely specify each of the above Avida options, cd into your build
directory and type something like:
$ cmake -DAVD_GUI_NCURSES:BOOL=ON \
  -DAVD_CMDLINE:BOOL=ON \
  -DAVD_UNIT_TESTS:BOOL=OFF \
  -DCMAKE_BUILD_TYPE:STRING=Release \
  path-to-source-directory


V. RUNNING CONSISTENCY TESTS
--------------------------------------------------------------------------------

With Avida built and 'installed' using CMake (the default for the 'build_avida'
script), simply execute the 'run_tests' script:

$ ./run_tests


For a list of useful options accepted by the TestRunner script, supply the -h
option on the command line:

$ ./run_tests -h


The 'builddir' option will be particularly for Xcode users.  This option will
allow the tests to be run on Xcode products without having to move the files to
where the CMake outputs are placed by default. For example, the default
Deployment build can be tested as follows:

$ ./run_tests --builddir=build/Deployment/


VI. DOCUMENTATION
--------------------------------------------------------------------------------

Helpful usage and code documentation can be found in the HTML files in the
'avida-core/documentation' directory.  See index.html.


Revised 2011-05-05 DMB

avida's People

Contributors

anyaevostinar avatar apakanati avatar apwagner avatar bdbaer avatar c-lliope avatar cholden23 avatar covertspartan avatar cse801a avatar dblackwood avatar dmbryson avatar dule123 avatar emilydolson avatar erkan-yilmaz avatar goingssh avatar heathergoldsby avatar jcfisher avatar jeffreybarrick avatar mercere99 avatar mmore500 avatar nahumj avatar ritwikbiswas avatar ruppmatt avatar vogelmi3-msu avatar zamanlh 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  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  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

avida's Issues

Unable to complete installation, Mac 10.14.5

After executing $ ./build_avida I'm stuck at:

[ 99%] Linking CXX executable ../bin/avida [ 99%] Built target avida

after approx. 1.5 hour. Should I wait more or something went wrong?
This is the content of the generated cbuild folder:

CMakeCache.txt Makefile bin lib CMakeFiles avida-core cmake_install.cmake libs

which is missing a work folder.

Resource injection over time

We discussed a need to be able to inject resources into an experiment directly from the resource.dat files from a previous run.

Update CMake Usage

  • Fix quoting issue ( #8 )
  • The CMake scripts need a general cleanup. Some file-lists could probably be made into pattern-matched lists.
  • Do we need to continue to build static/dynamic libraries for apto and avida-core? Emscripten requires that we use cmake's not-really-a-library "object library" to avoid name collisions within traditional binary library archives.
  • Update CMake's project layout to match ( #27 )
  • Update XCode's project structure to match changes herein.

Add CSV Output Option

As part of a transition to a csv outputs, add a configuration option to use commas instead of white space for field separators in output files.

Core dump while using resource dependent deme replication

While trying to program resource dependent deme replication (as in the documentation) I'm encountering the following error.

pure virtual method called
terminate called without an active exception
Aborted (core dumped)

The core dump only appears if I have the following line in the events.cfg file which is required for deme replication.

u 1:1:end ReplicateDemes birth-count

I'm guessing it's something to do with deleting objects while they are being used by the program.

Unsuccessful cmake on master branch

I tried downloading a fresh copy of avida and install on our local HPC system. However, the CMake command returned the following missing file error:

cmake ..
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CMake Warning (dev) at CMakeLists.txt:19 (ADD_SUBDIRECTORY):
The source directory

/mnt/home/colbrydi/monitors/avida/libs/apto

does not contain a CMakeLists.txt file.

CMake does not support this case but it used to work accidentally and is
being allowed for compatibility.

Policy CMP0014 is not set: Input directories must have CMakeLists.txt. Run
"cmake --help-policy CMP0014" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it.

-- Performing Test HAVE_FUSED_MADD
-- Performing Test HAVE_FUSED_MADD - Success
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
APTO_INCLUDE_DIR
used as include directory in directory /mnt/home/colbrydi/monitors/avida/avida-core

-- Configuring incomplete, errors occurred!

git submodule instructions are needed in the documentation

As I have seen this issue arise multiple times, I think we need to have documentation explicitly say to do these steps:

git submodule init
git submodule update

I'm raising the issue instead of a pull request because I'm uncertain of the apporpiate place for this information. The README and the wiki seem like good places, and maybe a check in the build_avida with a more informative error message than CMAKE's.

How to create random environmental fluctuations?

I apologize if this isn't the correct forum for this, but I haven't been able to find anything about how to do something like this anywhere.

In the maintenance of sex in changing environments paper, the authors mention that they create a changing environment by randomly selecting a resource to change from a nutrient to a poison and a resource to change from a poison to a nutrient.

I would like to make a similarly fluctuating environment and wanted to know how those random changes were created. I assume it would be in the "Events" file, but I haven't been able to figure out how to create a code or script to randomly select the resources to change.

Thank you in advance! I'm very interested in the possibility of using this software.

Mutex Support

The Windows branch seems to have difficulty with mutexes.

Understanding DumpGenotypeColorGrid

Hi there,

for demonstration purposes, I am trying to visualize the color grid of avida-viewer in hardware using an Arduino and an RGB LED matrix. While tinkering on how to capture the grid I came across the "DumpGenotypeColorGrid" switch in events.cfg. However, I cannot figure out the meaning of the values dumped in the respective files as I am unable to map them 1:1 to the graphical output of avida-viewer when inspected side-by-side and also don't understand their format.

Could you please provide some info on the format/encoding of these values? Or did I get the switch wrong and the files are not actually what I am looking for?

Ideally, I'd like to get some RGB-encoded color values that I can simply parse and forward to my Arduino via serial connection.

Thanks a lot in advance!
Nico

Linker Error for AvidaRNG when compiling in Visual Studio

When compiling the source, I receive about 120 instances of the following error in Visual Studio:
error LNK2001: unresolved external symbol "private: static int const Apto::RNG::AvidaRNG::MAX_SEED" (?MAX_SEED@AvidaRNG@RNG@Apto@@0HB) C:\Users\z\Desktop\avidabin\avida-core\avida-core.lib(cAnalyzeJobWorker.obj) avida

I reproduced this issue in VS 2010, 2012 and 2013, all on Windows 7 with both CMake 3.0/3.1. I am not sure how to resolve it, but it appears that apto/rng/AvidaRNG.h from AvidaRNG.cc cannot be found. I checked to make sure the build order was correct and the proper dependencies were in place.

I was able to successfully compile on Windows in late 2014 though I no longer have access to that machine to compare configurations. Could anyone who has compiled it on Windows provide their setup and/or reproduce this issue?

Add timer to check for runtime life

Perhaps 5 seconds? It is bound by the update. Should it be a separate thread just so the pinger doesn't get drowned out by the Avida runtime?

git submodule update error

Help!

On windows I am using git bash to clone avida. After downloading the files, I use the submodules: init and update. I get the following error message. Please help! If I use build the files using cmake and visual studio I run into tons of errors. I believe it is due to this error.
Thanks!
Andrew

C:\Users\ac202\Desktop\avida>git submodule init
Submodule 'documentation' (https://github.com/devosoft/avida.wiki.git) registered for path 'documentation'
Submodule 'libs/apto' (https://github.com/dmbryson/apto.git) registered for path 'libs/apto'

C:\Users\ac202\Desktop\avida>git submodule update
Cloning into 'C:/Users/ac202/Desktop/avida/documentation'...
Cloning into 'C:/Users/ac202/Desktop/avida/libs/apto'...
error: invalid path 'Analyze-mode-:-building-your-own-commands.md'
Submodule path 'libs/apto': checked out '02e18980071d237f1ea4641f3f35cae469e2ed38'
Unable to checkout 'bc4f3557a748ba65697e9e681cd09f54dc4b1c97' in submodule path 'documentation'

Unable to Test in Shell-Escape Required Directories

The run_tests utility will not work when avida is built in a directory hierarchy that requires the use of escaped characters.

A candidate solution is to use pipes.quote, which is deprecated, to escape the application and test-configuration paths. However, test-specific configuration that refers to either of these settings internally (e.g. %(default_app)s) will not execute.

Avida-ED: Organism Trace: crashes for certain genomes

Some genomes still crash consistently.

'AllBut2logic'
'0,heads_default,wsjagcvtvazystorcauoyucuyquufydpbusmyfqoocvvopxgxu' //allbut2logic
InternalError: uncaught exception: 25684784 - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch.
This one does take 790 cycles in the mac Avida-ED. I think the max cycles may be 999. That is what I get for one that seems to never reproduce.

It does display some that go to 999 cycles correctly.

Unable to build Xcode project

Disclaimer, I'm a web developer and my experience with C language/Xcode anything is minimal. However, I'd like to be able to play around with this lovely project. Basically, I'm looking for the quickest way to launch this thing, any help would be appreciated.

FYI, the binary here didn't seem to work: http://avida.devosoft.org/ -- First a config not found error, then segmentation fault when opening from command line.

Anyways, here's what I've done. The script to build_avida seemed to go okay.

#!/bin/sh

git submodule init
git submodule update
mkdir -p cbuild
cd cbuild
cmake "$@" ../
make -j 10 install

But opening up the Xcode project and building resulted in an error.

Ld /Users/graham/Library/Developer/Xcode/DerivedData/Avida-Core-avsjthwnyrzdtsaeysabngnpeghe/Build/Products/Debug/avida normal x86_64
    cd /Users/graham/Projects/AI/avida/avida-core
    export MACOSX_DEPLOYMENT_TARGET=10.9
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -L/Users/graham/Library/Developer/Xcode/DerivedData/Avida-Core-avsjthwnyrzdtsaeysabngnpeghe/Build/Products/Debug -F/Users/graham/Library/Developer/Xcode/DerivedData/Avida-Core-avsjthwnyrzdtsaeysabngnpeghe/Build/Products/Debug -filelist /Users/graham/Library/Developer/Xcode/DerivedData/Avida-Core-avsjthwnyrzdtsaeysabngnpeghe/Build/Intermediates/Avida-Core.build/Debug/avida.build/Objects-normal/x86_64/avida.LinkFileList -mmacosx-version-min=10.9 -lavida-core -lapto -Xlinker -dependency_info -Xlinker /Users/graham/Library/Developer/Xcode/DerivedData/Avida-Core-avsjthwnyrzdtsaeysabngnpeghe/Build/Intermediates/Avida-Core.build/Debug/avida.build/Objects-normal/x86_64/avida_dependency_info.dat -o /Users/graham/Library/Developer/Xcode/DerivedData/Avida-Core-avsjthwnyrzdtsaeysabngnpeghe/Build/Products/Debug/avida

ld: library not found for -lapto
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Dragging organism to grid in IE does not work right

When dragging an organism to IE, the mouse up event does not trigger. If a cell has never been selected, then the drag n drop fails. If there is a selected cell then the organism is put in that cell rather than where the mouse is released.

I have not yet found a way to get the mouse coordinate when the mouse is released during a dojo dnd event.

Remote Access Features

How should remote access to a running avida process work to maximize your productivity?

What features would you like it to have?

What data should be made available in the web browser? How would you like that data displayed?

Avida-ED: two messages for each update

I seem to be getting two messages that are webPopulationStats with the same update number. Then I get two messages that are webGridData. followed by two WebPopulationStats with the next value for updates, etc.

Not sure why I get two messages of each type with the same update number.

Somewhat incomplete configuration section in README

After using "ccmake ../" to configure avida and get avida-viewer, I had to run the "make" command and then "sudo make install" to actually make those changes happen. Might be basic knowledge for most, but I spent an hour figuring it out.

AvidaRNG and Visual Studio

This basically a duplicatioin of and earlier ISSUE "Linker Error for AvidaRNG when compiling in Visual Studio #13"
I am hoping someone has a suggestion for correcting it as its only getting the definitions of MAX_SEED and UPPER_BOUND available to the rest of the modules. I am new to Visual Studio and happy to help out, but this linker error is currently outside my capability.
Regards

Validate Viewer

The Avida2Driver and TextViewer driver have diverged with respect to their main population processing loop. This may cause undefined behavior for some types of experiments. Test runner appears unable to validate many test cases.

Using local storage to store dish configurations and organisms

I know you can download a zip file, but using local storage might be more convenient.

I would try to implement something myself, but I have no idea how the repo works, but there seems like there are no javascript files to edit?

Potentially an entire rewrite to html5 and javascript could be possible, if the C++ wrapper thing converts all the c++ code into canvas (unless I'm wrong?)

Separate "primitive" and ncurses viewer from AvidaCore

AvidaEd (all flavors) and experimental work with Emscripten have their code stored in a separate directory (apps/) from the "avida-core/" code. In general, I think it'd be a good idea to keep the code responsible for a particular interface and driver of Avida separate from its core library. Currently only the ncurses viewer, the "experimental" viewer (non-functioning?) code, and the "primitive" driver code are kept alongside the core library code.

Windows Testing

Regression testing on Windows needs to be updated to handle non-*ix scripting.

Random Seed 0 not seeded by time

The configuration value of 0 for the seed doesn't using the current time as the start value. Instead the seed of zero is used. This leads to identical runs if the seed isn't manually changed to other values.

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.