{"id":18850943,"url":"https://github.com/igitugraz/spore-nest-module","last_synced_at":"2025-07-28T12:10:14.683Z","repository":{"id":113036895,"uuid":"80747428","full_name":"IGITUGraz/spore-nest-module","owner":"IGITUGraz","description":"Synaptic Plasticity with Online Reinforcement learning","archived":false,"fork":false,"pushed_at":"2018-05-14T11:23:01.000Z","size":9028,"stargazers_count":25,"open_issues_count":5,"forks_count":11,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-03-27T23:11:18.650Z","etag":null,"topics":["music","nest","nest-module","reinforcement-learning","spiking-neural-networks"],"latest_commit_sha":null,"homepage":"https://igitugraz.github.io/spore-nest-module/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IGITUGraz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-02T17:05:19.000Z","updated_at":"2023-12-11T08:56:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"157b3c26-e33e-4034-b8f1-218d1d1d4840","html_url":"https://github.com/IGITUGraz/spore-nest-module","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IGITUGraz%2Fspore-nest-module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IGITUGraz%2Fspore-nest-module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IGITUGraz%2Fspore-nest-module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IGITUGraz%2Fspore-nest-module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IGITUGraz","download_url":"https://codeload.github.com/IGITUGraz/spore-nest-module/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248859977,"owners_count":21173339,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["music","nest","nest-module","reinforcement-learning","spiking-neural-networks"],"created_at":"2024-11-08T03:32:44.086Z","updated_at":"2025-04-14T09:52:21.214Z","avatar_url":"https://github.com/IGITUGraz.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1043486.svg)](https://doi.org/10.5281/zenodo.1043486)\n\n# NEST module SPORE:\u003cbr\u003e Synaptic Plasticity with Online Reinforcement learning\n\nSPORE is a custom-module for [NEST](http://www.nest-simulator.org/) that provides a simulation framework\nfor reward-based learning with spiking neurons. SPORE utilizes [MUSIC](https://github.com/INCF/MUSIC)\nfor communication with other software components.\n\n* A detailed installation guide for SPORE and all its dependencies can be found on the [SPORE wiki page](https://github.com/IGITUGraz/spore-nest-module/wiki).\n\n* A detailed documentation of the module can be found in the [SPORE class reference](https://igitugraz.github.io/spore-nest-module/).\n\n* We also provide a first [example](https://github.com/IGITUGraz/spore-nest-module/blob/master/examples/pattern_matching_showcase) that demonstrates a typical use case of SPORE.\n\n[![Plotting Animation][1]][2]\n\n[1]: https://cloud.githubusercontent.com/assets/22887425/24467479/f7235d1c-14b4-11e7-8ecf-ba19931d7f8d.gif\n[2]: https://github.com/IGITUGraz/spore-nest-module/blob/master/examples/pattern_matching_showcase\n\n## Quick Installation Guide\n\nSPORE requires NEST installed with MUSIC (`-Dwith-music=ON`) and Python bindings. Please make sure your version of NEST corresponds to or is newer than version 2.14.\nA detailed installation guide that also shows how to set up the dependencies is provided below and on the [SPORE wiki page](https://github.com/IGITUGraz/spore-nest-module/wiki).\n\n```bash\ngit clone https://github.com/IGITUGraz/spore-nest-module\ncd spore-nest-module\nmkdir build \u0026\u0026 cd build\ncmake ..\nmake\nmake install\nmake test\n```\n\n## Detailed Installation Guide\n\nThis guide describes how to install the SPORE module in version 2.14 for the NEST simulator in version 2.14. Combinining this version of SPORE with other versions of NEST may work but has not been tested.\nWe used MUSIC version 1.1.15 in revision [8e0a609b298](https://github.com/INCF/MUSIC/commit/8e0a609b29835be604ae556c1592aad9b4be1827) and [MPI](https://www.open-mpi.org/) (Open MPI 1.6.5).\nFurthermore we need python with the packages `pyzmq`, `numpy`, `ujson` and `matplotlib`.\nA guide to install these dependencies is provided below.\nFinally we used SPORE ([version 2.14](https://github.com/IGITUGraz/spore-nest-module/releases/tag/v2.14.0), or later).\nThe installation procedure was tested on Debian GNU/Linux 8.7 (jessie).\n\nThis guide assumes that you want to install everything into your local home folder `$HOME/opt/`.\nIt is further assumed that you checkout the software into a local folder that is used for development,\nwhich we refer to as `devel` folder.\n\n### Preparation\n\nAdd the following lines to your `~/.bashrc` (or `~/.zshrc` or `~/.profile` etc.)\n\n```bash\nexport TARGET_DIR=$HOME/opt/\nexport PATH=$PATH:$TARGET_DIR/bin\nexport LIBRARY_PATH=$LIBRARY_PATH:$TARGET_DIR/lib\nexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$TARGET_DIR/lib\nexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$TARGET_DIR/lib/nest  # required in some cases\nexport PYTHONPATH=$PYTHONPATH:$TARGET_DIR/lib/python2.7/site-packages\nexport PYTHONPATH=$PYTHONPATH:$TARGET_DIR/lib64/python2.7/site-packages\nexport LD_PRELOAD=/usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so  # required in some cases (path only works for debian jessie)\nexport NUM_CORES=3  # number of CPU cores\n\n```\n\nNow run `source ~/.bashrc` or close the current terminal now and start a new session such that the changes get applied.\n\nNow install all dependencies (for Debian Jessie). \n\n**Notes:**\n\n* Use `pip install --user \u003cpackage name\u003e` to install the python packages locally.\n* Use `sudo pip install \u003cpackage name\u003e` to install the python packages globally.\n* The python packages can also be installed in a [virtualenv](https://virtualenv.pypa.io/en/stable/).\n* For python3, use `pip3` to install python packages and install the python3 versions of the packages for NEST dependencies. \n* The use of multiple different python3 versions is discouraged.\n  Make sure to consistently use *one* version for installing libraries and actually running experiments.\n  When installing MUSIC, the specification of the precise executable (e.g. `python3.4`), rather than `python3`,\n  may be necessary in ambigous cases (see [#9](https://github.com/IGITUGraz/spore-nest-module/issues/9)).\n\n```bash\n# For NEST and MUSIC\napt-get install build-essential cmake\napt-get install python python-dev python-pip\napt-get install libreadline-dev gsl-bin libgsl0-dev libncurses5-dev openmpi-bin\n\napt-get install automake libtool # BUILD Dependencies\napt-get install libopenmpi-dev libopenmpi1.6 # RUN Dependencies\napt-get install freeglut3-dev # Optional, for viewevents\npip install cython\npip install mpi4py # RUN Dependencies\n\n# For SPORE\napt-get install libzmq3  # For realtime plotting\npip install pyzmq # For real-time plotting\npip install numpy  # For testing\npip install ujson\npip install --upgrade matplotlib  # (Optional, If you want to have nice plotting, you should upgrade `matplotlib` to the newest version)\n```\n\n\n### Installing MUSIC\n\nIn your `devel` folder, check out the latest version of MUSIC from https://github.com/INCF/MUSIC\n\n```bash\ngit clone https://github.com/INCF/MUSIC.git\n```\n\nNote that at the moment `--disable-isend` is required because\nof a [critical problem](https://github.com/INCF/MUSIC/issues/35#issuecomment-280332573)\nin the MUSIC scheduler.\n\nIn the folder `./MUSIC/` :\n\n```bash\n./autogen.sh\nPYTHON=/usr/bin/python ./configure --prefix=$TARGET_DIR --disable-isend  # Replace with python3[.x] if desired\nmake -j$NUM_CORES\nmake install\n```\n\n### Installing NEST\n\nIn your `devel` folder, check out the latest version of NEST from https://github.com/nest/nest-simulator\n\n```bash\n# use the latest developmental version of NEST. Release versions don't currently work with SPORE\ngit clone https://github.com/nest/nest-simulator.git\n```\nThen in the folder `./nest-simulator` :\n\n```bash\nmkdir build\ncd build/\ncmake -DCMAKE_INSTALL_PREFIX:PATH=$TARGET_DIR -Dwith-music=ON -Dwith-mpi=ON -Dwith-python=2 ..  # Change python version to 3 for Python 3\nmake -j$NUM_CORES\nmake install\n```\n\n### Installing SPORE\n\nIn your `devel` folder, check out the latest version of SPORE from https://github.com/IGITUGraz/spore-nest-module\n\n```bash\ngit clone https://github.com/IGITUGraz/spore-nest-module.git\n```\n\nThen in the folder `./spore-nest-module` :\n\n```bash\nmkdir build\ncd build/\ncmake -Dwith-python=2 ..  # Change python version to 3 for Python 3, or provide a path to a python binary\nmake -j$NUM_CORES\nmake install\nmake test\n```\n\nIn `ipython` (or `ipython3`) running `import nest` and then `nest.Install(\"sporemodule\")` should now yield the following:\n\n```\nIn [1]: import nest\n[INFO] [.../rng_manager.cpp:238 @ Network::create_rngs_] : Creating default RNGs\n[INFO] [.../rng_manager.cpp:233 @ Network::create_rngs_] : Deleting existing random number generators\n[INFO] [.../rng_manager.cpp:238 @ Network::create_rngs_] : Creating default RNGs\n[INFO] [.../rng_manager.cpp:284 @ Network::create_grng_] : Creating new default global RNG\n\n              -- N E S T --\n\n  Copyright (C) 2004 The NEST Initiative\n  Version 2.14.0 Oct 30 2017 13:06:41\n\nThis program is provided AS IS and comes with\nNO WARRANTY. See the file LICENSE for details.\n\nProblems or suggestions?\n  Visit http://www.nest-simulator.org\n\nType 'nest.help()' to find out more about NEST.\n\nIn [2]: nest.Install(\"sporemodule\")\n\nOct 31 13:26:30 Install [Info]: \n    loaded module SPORE (version 2.14.0)\n```\n\n## Running a first experiment\n\nThat should be it.\n\nNow you should be able to execute the script [`experiment.py`](https://github.com/IGITUGraz/spore-nest-module/blob/master/examples/pattern_matching_showcase/experiment.py) in\n\n`spore-nest-module/examples/pattern_matching_showcase`.\n\n## Cite SPORE\n\nPlease cite the current version of SPORE as\n\n```\nDavid Kappel, Michael Hoff, \u0026 Anand Subramoney. (2017, November 7).\nIGITUGraz/spore-nest-module: SPORE version 2.14.0 (Version v2.14.0).\nZenodo. http://doi.org/10.5281/zenodo.1043486\n```\n\n## License\n\nSPORE is open source software and is licensed under the [GNU General Public\nLicense v2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html) or later.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figitugraz%2Fspore-nest-module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Figitugraz%2Fspore-nest-module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figitugraz%2Fspore-nest-module/lists"}