WebSim 1.30
Home | Machine Learning | Crypto | Graphics
Publications | Concise Pubs | BibTeX Pubs | Other Pubs | WebSim


Overview
Demos
More Complex Demos
Speed Improvements
Download
Where to get more information

Overview
4 July 1998:     WebSim is a general simulator for neural networks, reinforcement learning, fractals, etc. WebSim has been designed for extendability, so it is easy to more more functions as needed. WebSim modules now exist so that a simulation can be performed by using any combination of the following modules:

Learning Algorithms: supervised learning, TD(Lambda), Q-learning, value iteration, advantage learning
Function approximators: lookup table, linear function approximator, multilayer perceptron (with a wide variety of squashing functions), radial basis functions (also with a wide variety of squashing functions), These can also be combined in series, and the they all know how to calculate both gradients and Hessians for those learning algorithms that use first or second derivatives.
Gradient-descent methods: backprop (with momentum), conjugate gradient. These can run in either incremental mode (changing weights after each training example), epoch-wise (changing after one pass through all examples), or in batches (changing after each N examples). These can either use the true gradient (residual gradient algorithms), a false gradient ignoring generalization in the function approximator (direct algorithms) or a linear combination in between (residual algorithms).
Graphics: 2D plots, 3D plots, contour plots. These can show the function learned, the value function learned (optimal Q-value/Advantage in each state), or the policy.

WebSim is best viewed under a JDK 1.1 browser, rather than JDK 1.0. This means that Netscape 4.05 will not work, but Netscape 4.06 and higher will work. Recent versions of MSIE and HotJava also work fine.


WebSim Demos
backprop learning of a nonlinear function by a sigmoidal multilayer perceptron
gradient descent on the sum of two mean-squared-error functions to satisfy both simultaneously.
conjugate gradient learning of an ill-conditioned linear function by a linear function approximator
Value Iteration demo.
Gridworld experiment with a lookup table.
show the names of all threads that are currently running.
Grids that can be used as backgrounds for 2D plots in WebSim.
3D VRML scene controlled by a WebSim experiment. This works with Netscape using the Cosmo Player beta 3a plugin. Both beta 5 and beta 3a are available for download, but only beta 3a has supports Java. This beta Cosmo is slow and crashes frequently, but it does give a hint of what the final realease will look like.


More Complex Demos
The following examples require security privileges that may not be available on all Java systems. For example, one that writes to a file on the hard drive will work under the JDK or Cafe or HotJava, but not under the current version of Netscape or Internet Explorer.

Create a short summary BNF description of the language WebSim parses, and send it to standard out (requires access to the hard drive).
Create a long, well-commented BNF description of the language WebSim parses, and send it to standard out (requires access to the hard drive).
Create a sequence of GIFs showing the 3D graph change as backprop learns a nonlinear function (requires accesss to the hard drive).
Load a data set from the Internet and do supervised learning on it. (requires security settings that allow ftp connections to the University of California at Irvine).


Speed Improvements
WebSim is fast under the WinNT Symantec jit version 2.0 (beta 33). The slowest part of the code will be something like a large matrix multiply. For some matrix operations, Java is as fast as C, and for others it is slower. On tasks such as graphics, Internet and file access, and most math operations, Java will be as fast as optimized C, since those operations are done in either the operating system or the Java runtime libraries which are written in C. The Symantec jit has been liscensed by Netscape for their browser and Sun for its JDK, so this type of speed should soon be widely available, at least on PCs. Since a machine-learning problem with a large neural net spends most of its time in the matrix library, it can be useful to have WebSim use compiled C code for the matrix operations. WebSim has been written to automatically check to see if it is in a runtime environment that allows native code (precompiled C code) to be linked in, and if so it automatically checks the hard drive to see if there is any matrix code there. If there is, it automatically uses that for all the matrix operations, increasing their speed for some operations. To use this feature, you don't have to modify WebSim; simply place the compiled code at the appropriate place on the hard drive. On a PC, download Matrix.DLL into the directory c:\windows (for Win3.1 or Win95) or c:\WinNT.0 (for WinNT). That's it. The code will automatically be used by WebSim. WebSim will not have to be changed to use native code on other platforms. To go back to pure Java, just rename the DLL file or move it to another directory. The source is in this directory and is plain ANSI C, so it can be compiled for any platform using the .h files that come with the JDK or Cafe.


Download
The following information about WebSim is currently available for download or reading online:

The full source code
The automatically-generated documentation for the source code
The short and long BNF description of the WebSim language.
An intro to writing WebSim classes
The code revision history
zip file containing all of the above.
WebSim is best viewed under a JDK 1.1 browser, rather than JDK 1.0. Most browsers (including MSIE and Hot Java) are 1.1. The standard Netscape 4.05 browser is still 1.0, but a 1.1 version of Netscape 4.05 is available for free download.


Where to Get More Information
This version of WebSim is equivalent to a late beta; it doesn't crash, but it is still undergoing major changes. This code is (c) 1996-1998 by the respective authors, is freeware, and may be freely distributed. If modifications are made, please say so in the comments. WebSim was designed and the core code was written by Leemon Baird. Other major portions of WebSim were written by Mance Harmon, Scott Weaver, and Ansgar Laubsch. WebSim also uses freeware utility code downloaded from the Web, including Nicholas Paldino's ftp code, Ernest Friedman-Hill's Postscript saving code, and Jef Poskanzer's GIF saving code. See their Web sites for restrictions on the use of their code. If you find WebSim useful, please send e-mail to Mance Harmon so he can keep everyone informed as changes are made. If you write new WebSim modules and are willing to make them freeware too, let him know and we'll add them to this archive or add a link to your archive.