USC Brain Project
  Neural Simulation Language  
 
 
  Homepage  
 
  Downloads  
 
  Online Models  
 
  Documentation  
 
 
 
 
  CVS Repository  
 
  Related Links  
 
  People  
 
 
USC Homepage
 
 
 
NSLmatlab 1.0
 
 

Neural Simulation Language
MatLab Version, Source and Executables

Description: Our another version of NSL is implemented by MatLab's simulink. This simulation tool is for complementing visualization of a model and extensibiltiy to other simulation methods. We try to keep NSLj and NSLc's characteristics as much as possible.

MatLab is the most popular simulater for engineers. It has easy interface to handle matrixes and visualization. Moreover, hundreds of modules from theoretical mathmatics to applied robotics are made and provided by its users. Even though current nueral network toolbox for matlab is powerful but weak ability to show the structure of a neural model. Our new NSL is focused on visualzation of Neuronal model structure as the SCS does.

Additionally, our another challenge of Nslmatlab is migrating models which were developed by other version of NSL. The code for this work will not be distributed yet. If you plan to contribute it or need it, please contact here

MatLab is not included in this package but required to use this package. To purchase it, please visit here, http://mathworks.com

 
File size: 36.3 KB
 
Created on: 30 October 2004
 
Installation steps:
  1. To begin the installation process MatLab 6.5 or higher on your machine. This is not a free software, so you need to purchase it at http://mathworks.com. Or, if you are a student or a faculty of universities, please check whether your university has a license for you. (USC has it.)
     
  2. Next download the NSLJ MatLab Toolbox.
     
  3. Extract the archive to a specified folder. (you can use Winzip for this purpose).
     
  4. Add the folder into MatLab's path. Click File->Set Path in the MatLab Menu after run it. Find the folder you extracted files, and click "Add Folder". It is recommended to restart matlab; sometimes path information is not updated immediately.
     
  5. Each work session, before starting to work with NSL, you need to execute the resume file:

    NslInit
Testing NSL: Assuming that you are currently in MatLab command line and typed "NslInit" already. This tutorial is also provided in the document section.
  1. Change to the directory [NSL directory]\demo then open backpropmodel.mdl.
    open backpropmodel.mdl
  2. Double click the block "inData". It has the data set to learn as indicated as "xor_3_data". This demo version already has the "xor_3_data.txt" file.
    load xor_3_data.txt
    In the workspace, xor_3_data matrix is generated. (You can double click it in the workspace menu to explore it)
     
  3. Change mode to run.
    RunOption(1)=1
  4. Simulate the model as clicking the simulation button in the block diagram.

 
 
 
 
 
NSLJ 3.0.s
 
 

Neural Simulation Language
Java Version, Source and Executables

Description: NSL 3.0.s (Neural Simulation Language, version 3.0.s), is a simulation system for large-scale general neural networks. NSL provides a simulation environment simplifying the task of modeling neural networks. In particular, NSL supports neural models having as basic data structure neural layers with similar properties and similar connection patterns, where neurons are modeled as leaky integrators with connections subject to diverse learning rules. Development of NSL has gone hand in hand with modeling of neural mechanisms underlying visuomotor coordination, with special emphasis on the analysis of data from anurans, monkeys, and humans. NSL follows an object-oriented design, providing higher level programming abstraction corresponding to neural elements. NSL provides system development tools, such as visualization capabilities and a run-time interpreter, which give the user powerful tools in developing and analyzing models. NSL has been widely used throughout the world for both teaching and research.
 
File size: 2.82 MB
 
Created on: 4 April 2003
 
Installation steps:
  1. To begin the installation process you must have Java 2 Software Development Kit (SDK) v1.2 or higher installed on your machine. This can be found at the Javasoft site http://java.sun.com/j2se

    [Optional] If you want to recompile the NSLJ compiler, you must have Javacc 2.1 installed on your machine. This can be found at http://javacc.dev.java.net.
     
  2. Next download the NSLJ 3.0.s class files and source code.
     
  3. Extract the archive (you can use Winzip for this purpose).
     
  4. Setup the NSLJ_ROOT and the JAVA_HOME environment variables:

    [UNIX] Edit the file "NSL3_0_s/resume" (e.g. using vi or pico) such that it matches your environment (e.g. you have to specify the path where you installed Java and the path where you installed NSL). For example, if you have installed Java under /usr/java and extracted the NSL archive under /db0/home/smarmol, the resume lines should look like:
    setenv NSLJ_ROOT /db0/home/smarmol/NSL3_0_s
    setenv JAVA_HOME /usr/java
    You don't need to change any other line from this file.

    [Windows] Edit the file "NSL3_0_s/resume.bat" (e.g. using notepad or edit) such that it matches your environment (e.g. you have to specify the path where you installed Java and the path where you installed NSL). For example, if you have installed Java under C:\j2sdk1.4.1_01 and extracted the NSL archive under C:\, the resume.bat lines should look like:
    set NSLJ_ROOT=C:\NSL3_0_s
    set JAVA_HOME=C:\j2sdk1.4.1_01
    You don't need to change any other line from this file.
     
  5. Each work session, before starting to work with NSL, you need to execute the resume file:

    [UNIX]Open an xterminal (e.g xterm), change to the NSL3_0_s directory, and execute the following line:
    source resume
    [Windows]Open a Command window (e.g cmd), change to the NSL3_0_s directory, and execute the following line:
    resume
Testing NSL: Assuming that you are located in the NSL3_0_s directory:
  1. Change to the directory where the Maximum Selector model source are located.

    [UNIX]
    cd nsl3_0/BasicBookModels/MaxSelectorModel/1_1_1/src
    [Windows]
    cd nsl3_0\BasicBookModels\MaxSelectorModel\1_1_1\src
  2. Compile the model.
    nslc MaxSelectorModel
  3. Simulate the model.
    nsl MaxSelectorModel

 
 
 
 
 
SCS 1.0 beta
 
 

Schematic Capture System
Java Version, Source and Executables

Description: SCS 1.0 beta (Schematic Capture System, version 1.0 beta), is a visual programming interface to NSL that serves both as a browser as well as a tool for creating new model architectures. While SCS does not provide the full programming functionality of NSL, it provides visual support in designing modules and their interconnections.
 
File size: 998 KB
 
Created on: 21 October 2002
 
Installation steps:
  1. To begin the installation process you must have Java 2 Software Development Kit (SDK) v1.2 or higher installed on your machine. This can be found at the Javasoft site http://java.sun.com/j2se

  2. Next download the SCS 1.0 class files and source code.
     
  3. Extract the archive (you can use Winzip for this purpose). You may want to install the software in a directory that indicates what version of the software you have such as: C:\SCS1_0_beta.
     
  4. There must be two files in the directory c:/documents and setting/administrator that MUST be created (you may need administrator privileges for doing this step): The SCS_PREFERENCES and SCS_LIBRARY_PATHS files. Please note that neither of the files have extension. A copy of these files must be saved in the directory C:/documents and setting/username, where username should be substituted for the account name of the user that is going to use SCS:

    [SCS_PREFERENCES]This file would look like this:
    scs_home=C:/usc/ns/NSL3_0_s/scs/src
    scs_trashdir=C:/usc/ns/NSL3_0_s/scstrash
    drawBackgroundColor=black
    noActionTakenBackgroundColor=lightGray
    scs_keymapType=Emacs
    Notes:
    1. scs_home is the where the software will find the "resources" directory.
    2. The scs_trashdir is where scs will move deleted modules.
    3. scs_keymapType should be set to either Emacs or Word. This tells the editor what keystrokes will be used as shortcuts.
    4. The slashes must be / , not \

    [SCS_LIBRARY_PATHS]This file would look like this:
    firstLib=C:/usc/ns/NSL3_0_s/nsl3_0/FirstLib
    booklib=C:/usc/ns/NSL3_0_s/nsl3_0/BasicBookModels
    Note:
    1. The list of libraries can be quite long. The first parameter is the nickname of the library and the second parameter is where the library is actually located.
Testing SCS: Assuming that you are located in the directory where you extracted the SCS archive (e.g C:\SCS1_0_beta):
  • Load the Schematic Capture System.

    java SchEditorFrame

 
 
 
 
 
NSLJ 3.0.s Jar files
 
 

Neural Simulation Language
Java Version, Jar files

Description: NSL 3.0.s (Neural Simulation Language, version 3.0.s), is a simulation system for large-scale general neural networks. NSL provides a simulation environment simplifying the task of modeling neural networks. These jar files are provided for the users that want to post their models on the web.
 
File size: 978 KB
 
Created on: 4 April 2003
 
Installation steps:
  1. To begin the installation process you must have Java 2 Software Development Kit (SDK) v1.4 or higher installed on your machine. This can be found at the Javasoft site http://java.sun.com/j2se

  2. Next download the NSLJ 3.0.s jar files.
     
  3. Extract the archive (you can use Winzip for this purpose). You may want to install the software in a directory that indicates what version of the software you have such as: \NSL3_0_s\jars. This directory should be accessible from the web server where you want to post the models.
Testing the jar files:
  1. Create a jar file of the model that you want to post. For example, assuming that you are located in the NSL3_0_s directory and you want to create a jar file of the Maximum Selector model named max.jar:

    Change to the directory where the Maximum Selector model source are located:

    [UNIX]
    cd nsl3_0/BasicBookModels/MaxSelectorModel/1_1_1/src
    [Windows]
    cd nsl3_0\BasicBookModels\MaxSelectorModel\1_1_1\src
    Compile the model:
    nslc MaxSelectorModel
    Put all the class files into a jar named max.jar:
    jar -cvf max.jar *.class
  2. Put all the jar files (nsl.jar, tcljava.jar, jacl.jar and max.jar). In the directory where the html page of the model is going to be created.
     
  3. Write in the html page of the model the following lines:
    <APPLET  CODE = "NslApplet.class" 
    	 CODEBASE = "./" 
    	 ARCHIVE = "max.jar, nsl.jar, jacl.jar, tcljava.jar"
    	 ALT = "The browser understands the APPLET tag but can't run Java applet"
    	 WIDTH = "434" HEIGHT = "70" 
    	 ALIGN = "baseline">
    <PARAM  NAME = "MODEL" VALUE  = "MaxSelectorModel">
    </APPLET>
    
  4. Notes:
    1. The ARCHIVE attribute (in green) of the APPLET tag should contain the nsl.jar, jacl.jar and the tcljava.jar files, plus the jar file of your model (in this case max.jar)
    2. The VALUE attribute (in blue)
    3. of the PARAM tag should contain the name of the model to be executed (in this case MaxSelectorModel).
    4. This html code would work only in browsers where Java 1.2 or higher is the default virtual machine. If you want your models to be run by the Java plug-in, you can translate this html code using the Java Plug-in 1.2 HTML Converter.