Code Monkey home page Code Monkey logo

johndpope / polyworld-server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rockhowse/polyworld-server

0.0 3.0 0.0 6.89 MB

This is based off the original polyworld simulation codebase, except it can accept network connections allowing agents to register and get broadcasts of information the agent can use to render it's own view as well as do any AI predictions.

License: Other

Makefile 22.42% C++ 47.33% C 0.62% QMake 0.27% Python 22.91% Shell 6.45%

polyworld-server's Introduction

polyworld

This is a git repo taken from the original polyworld CVS branch.

http://shinyverse.org/larryy/Polyworld.html

It mainly follows the installation instructions found here:

http://shinyverse.org/larryy/BuildingPolyworld.html#Linux

Copy of the instructions here, with modifications to make it work on Linux Mint 14 x64:

Linux

First install Polyworld's dependencies:

sudo apt-get install build-essential xorg-dev libgl1-mesa-dev scons cvs libgsl0-dev libqt4-opengl-dev python2.7-dev

NOTE On unbutu, we had to include the python2.7-dev to fix the #include <Python.h> and other header file issues.

Solution taken from here:

http://stackoverflow.com/questions/8282231/ubuntu-i-have-python-but-gcc-cant-find-python-h

Then get your code from this github repo or fork it to your own and clone from there:

https://www.github.com/rockhowse/polyworld

We then need to add a couple of symbolic links that are

If you attempt make at this point you will get two errors:

  1. /usr/bin/ld: .bld/Polyworld/utils/Mutex.o: undefined reference to symbol 'pthread_spin_init@@GLIBC_2.2.5'
  2. /usr/bin/ld: .bld/Polyworld/proplib/cppprops.o: undefined reference to symbol 'dlsym@@GLIBC_2.2.5'

To fix this, add the directives "-pthread -ldl" to the very last g++ linker command example:

g++ -o Polyworld ... -pthread -ldl

Here is what each one fixes:

-pthread ~ resolves the pthread_spin_init error.
-ldl     ~ resolves the dslym error.

I will try to add these to the SCons (?) configuration.

Build Polyworld using make, and try the only worldfile that currently exists to test with:

make
./Polyworld ./sandbox/social/feed_young.wf

For the analysis tools you will also need to install the following dependencies:

sudo apt-get install python-numpy python-scipy gnuplot

All these installed fine for me, so nothing extra for Unbutu 14.

QTCreator

The original code I found didn't include a .pro file for building inside QTCreator. I have included a new polyworld.pro file that has the configuration I used. Basically, it does the following:

  1. Includes all the base directories/.cp/.h file from the main folders in the polyworld project

  2. I had to specify a specific C++ standard becasue by default it tried to use C++98

    QMAKE_CC = g++ -std=c++11

  3. I had to add a bunch of libraries to the linking path in the .pro file as I saw no way to do it easily inside QTCreator GUI itself

    LIBS += -pthread -ldl -lz -lgsl -lgslcblas -lGL -lGLU -lpython2.7

I have yet to test and see if the application runs as intended. At this point it fully compiles inside QTCreator5.x on Mint 14 so I am making progress.

polyworld-server's People

Contributors

rockhowse avatar

Watchers

John D. Pope avatar James Cloos avatar  avatar

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.