Differences between revisions 24 and 25
Revision 24 as of 2009-03-16 01:15:44
Size: 3897
Editor: JunHu
Comment:
Revision 25 as of 2009-03-16 01:30:33
Size: 4331
Editor: JunHu
Comment:
Deletions are marked like this. Additions are marked like this.
Line 60: Line 60:

== A Simple XOR Example ==

Follow [[http://www.jooneworld.com/docs/sampleEditor.html|the GUI example]] from JOONE website, build and train the neural network to solve the XOR problem. Export the network and load it in your Java program. Try to use the Java program in Max.

The complete source code, sample data and the Max patcher can be downloaded [[attachment:xor.zip]]

The Max patcher:

{{attachment:xorpatcher.png}}

g=max(intelligence)

Philip Ross & Jun Hu

March 2009

  • /!\ In this workshop we are going to use PC's and Microsoft Windows. If you happen to have a Mac, no problem --- things mentioned in this workshop should work on Mac too. But please find a PC for this workshop because we are not going to deal with platform differences.

Workshop material

Software Installation & Configuration

Max

Follow the installation instructions came with the software.

When later we try to load Java externals, Max might complain about QuickTime not being installed. So if you don't hate Apple that much, install QuickTime.

JRE or JDK

To make use of Max quickie (an integrated Java editing and compiling tool within Max), you have to install JDK for its Java compiler. Since in this workshop we are going to use Eclipse for programming Java, JDK is not necessary.

No matter which one to be installed, run the installer and simply follow the instructions.

Eclipse

To synchronize what we are going to point to and what we are talking about, please install Eclipse and JOONE in C:\Programs. ( /!\ Note, not C:\Program Files --- it has a good reason to do so.)

Extract the downloaded ZIP file to C:\Programs so that eclipse.exe is in C:\Programs\eclipse. Create a shortcut to C:\Programs\eclipse\eclipse.exe on your desktop: Go to C:\Programs\eclipse, right click on eclipse.exe, select Send to and then Desktop(create shortcut).

JOONE

Download the GUI editor.

If you are using Windows XP, download the version for Windows (Without JVM).

  • Run the installer. When asked by about where would you like to install, answer "C:\Programs\joone". When asked about where would you like to create links, select Other, and choose your Desktop. If you see an error message about available disk space, possibly because you have too much of space left on you C: disk and the installer could not understand the big number of bytes. Ignore the error message unless you are really running out of disk space.

If you are using Windows Vista or Mac, download the version for All Platfs (Without JVM).

  • Extract the downloaded Zip file to C:\Programs so that RunEditor.bat is in C:\Programs\joone. Create a shortcut to RunEditor.bat on your desktop.

After installed Eclipse and JOONE, check again to see whether they are at right places:

EclipseJOONE.png

JOONE engine for Max

To be able to use Java externals with JOONE engine in Max, JOONE engine must be visible to Max. The simple way to enable it is to copy the JOONE engine

C:\Programs\joone\lib\joone-engine.jar

and put it into Max's Java library directory:

C:\Program Files\Cycling '74\Max 5.0\Cycling '74\java\lib

Setup Eclipse

In order to communicate with the Max patcher and the JOONE engine, your eclipse project must include both the max.jar library and the joone-engine.jar in its build path:

EclipseBuildPath.png

A Simple XOR Example

Follow the GUI example from JOONE website, build and train the neural network to solve the XOR problem. Export the network and load it in your Java program. Try to use the Java program in Max.

The complete source code, sample data and the Max patcher can be downloaded xor.zip

The Max patcher:

xorpatcher.png

JunHu: MaxJavaArduino (last edited 2011-08-30 18:14:49 by dyn-176109)