Skip to content

Install

Randall O'Reilly edited this page Apr 26, 2019 · 30 revisions

Installation

This wiki provides an umbrella wiki for all emer projects. The emergent repository itself does not contain directly runnable code (except for tests) -- it serves as a toolkit for other specific algorithms.

Currently the only implemented one is in the leabra repository. Thus, you need to install that to see how emergent works.

In general, emergent works by compiling programs into executables which you then run like any other executable. This is very different from the C++ version of emergent which was a single monolithic program attempting to have all functionality built-in. Instead, the new model is the more prevalent approach of writing more specific code to achieve more specific goals, which is more flexible and allows individuals to be more in control of their own destiny..

First, install GoGi

Emergent depends on GoGi, so first follow the installation instructions for it, including building the standard widgets example to make sure everything is working. This is essential especially because there are non-Go elements that need to be installed to support the 3D GUI, which won't be installed with the generic go get command.

Then install leabra

Typically in Go you want to install at the level of a specific final executable package, because it will include all the other packages (libraries) that are needed. Thus, we first use the go get command to grab the specific package containing this target executable, and then we run another go get command to grab all the other dependencies:

> go get github.com/emer/leabra    # ignore any warnings about no go files, etc.
  • Go to the examples/leabra25ra directory and make sure all dependencies are installed (and updated)
> cd ~/go/src/github.com/emer/leabra/examples/leabra25ra    # use `$GOPATH` instead of `~/go` if you have that set
> go get [-u] ./...    # the -u (update existing) may be needed but will take a lot longer -- try without first..
  • Important: IGNORE any error messages you see from go get (including "no go files..") -- the only thing that matters is what happens with go build! get somehow gets confused with a few things..

  • Finally, build and run the executable:

> go build     # any errors here are likely fatal.. file an issue (again, install gogi first!)
> ./leabra25ra  # this will run the program

To make your own simulations, copy the ra25.go code to your own repository, and modify accordingly, then you can just do go build to make it. Also, you can look at the revision history of this file after you've copied, to see any updates we've made (bug fixes, new features).