The Behavioral Scientist's Toolbox

This site offers a wide range of computer and programming tools to design, assemble, manage, and analyze behavioral experiments. Individual modules provide functions for video tracking, control of robotics, independent agent modeling, statistical analyses and graphing, mapping of spatially explicit data into Google Earth, and 3D rendering of virtual animals. These functions are available as freeware, extensible, java-based library packages for behavioral screening, analysis, and testing.

Current genomic and proteonomic approaches are capable of yielding terrabyte quantities of data within hours. The complexity of behavioral phenotypes imposes an intrinsic upper limit to the application of high-throughput screening for biologically significant behaviors. However, technological advances in the fields of electronics, statistics, and engineering, allow us to maximize temporal and spatial resolution for automated behavioral analysis. Our current efforts focus on bridging analyses of visual media, advanced techniques of statistical inference, and robotics for creating integrated behavioral paradigms.

Functions are grouped within the JavaGrinders Class Library, developed as a general package to simplify the specialized aspects of behavioral analyses. Individual packages of the library contain implementations of routines for:

  1. video tracking and automated behavioral screening

  2. 3D rendering of virtual animals and their behavior

  3. robotic control of relays, servomotors, animations, and sensors

  4. individual agent modeling and analyses of social interactions

  5. multivariate statistical analyses and graphing

  6. spatial analyses and mapping of spatially explicit data into Google Earth

Using the provided functions, complex programs can be written using a few lines of code. Java code generally depends on an extensive library of classes which help in the nuts and bolts of such processes. To help with the tasks above a framework of modular custom classes was developed and collated in the com.lobsterman.JavaGrinders library.

Applications and Applets

All functions are accessible to Applets and Applications. Java Applets download automatically as part of webpages and begin to execute their "untrusted" code. In this case, it makes good sense to only allow actions which pose no danger to the local environment. For security reasons, an Applet cannot access or modify files on the local computer where it is being run. This requires that data are entered manually, precluding access to the user’s local data files. Java applications on the other hand must be downloaded and installed like any other program and are therefore not subject to the same security risks and restrictions. The framework provides high-level classes for either purpose. The recent version provides support for applets as legacy code but tapping into the library’s functionality via java apps is encouraged.

Why Java?

The Java programming language is a modern implementation that offers a number of advantages. The language derives much of its syntax from C/C++ but offers a simpler object model and fewer low-level facilities. Java applications are typically compiled into bytecode (i.e., class files) that run on any computer architecture with a Java Virtual Machine (JVM). The entire source code is usually contained in a single text file without confusing header or library files. Compilation is done with a freeware Java Compiler and there is a wealth of wonderful tutorial files and online programming resources available to guide the user along. A few lines of HTML are enough to embed JavaGrinders applets in a page and they run within the common web browsers and applet viewers regardless of the computer platform.

What do I need?

Java is a cross-platform technology. Aiming to provide a pure java implementation, most tools of the JavaGrinders library only depend on an install of the Java Framework. Only the video tracking application still depends on a few key functions of Apple Quicktime which will be replaced in future versions as alternatvies become available. To develop customized programs that utilize JavaGrinders functionality one requires a computer with a recent version of Java (Java SE 5.0 or higher), a Java Compiler (e.g., javac, Eclipse), and the JavaGrinders library. A great place to start with Java is Java Programming Resources.

  1. Java SDK: To install java, download the full Java SE Development Kit which includes the Java Runtime Environment (JRE) the javac compiler etc.

  2. Write, Compile and Run Code: Download and install the Eclipse Integrated Development Environment

  3. JavaGrindersSDK: Download and extract the JavaGrindersSDK

How to cite

If you use JavaGrinders functionality please consider citing this website in your work with something like “XXX was performed using a collection of freeware programming functions for the analysis of behavioral data (available on the Internet at”


A selection of published work that utilizes functions of this library.

  1. Murphy KR, Park JH, Huber R, & WW Ja. in press. Simultaneous measurement of sleep and feeding in individual Drosophila, Nature Protocols.

  2. Murphy KR, Deshpande SA, Yurgel ME, Quinn JP, Weissbach JL, Keene AC, Dawson-Scully K, Huber R, Tomchik SM & WW Ja. 2016. Postprandial sleep mechanics in Drosophila. eLife 2016;5:e19334 <>.

  3. Bhimani R & R Huber. 2015. Operant avoidance learning in crayfish, Orconectes rusticus: Computational ethology and the development of an automated learning paradigm. Learning & Behavior. DOI 10.3758/s13420-015-0205-y

  4. Donelson N, Kim EZ, Slawson JB, Vecsey CG, Huber R & LC Griffith. 2012. High-resolution long-term tracking for analysis of Drosophila sleep and locomotion. PLoS ONE 7(5): e37250

  5. Potenza L & G Mancinelli. 2010. Body mass-related shift in movement behaviour in the isopod Lekanesphaera hookeri (Isopoda, Flabellifera): A laboratory study. Italian Journal of Zoology 77(3): 354–361

  6. Mancinelli G. 2010. Intraspecific, size-dependent variation in the movement behaviour of a brackish-water isopod: a resource-free laboratory experiment. Marine and Freshwater Behaviour and Physiology 2010: 1–17

You can help expand and improve the content of this site by submitting links, bug-reports, source code, feature requests, articles, or general feedback directly to Robert Huber <>.