Ken-Soft

Software and the World


Rubik’s Cube - 2D Implementation - Java

Posted under Game Development, Java, Logic Problems, Programming, Rubik's Cube, Software Development by Kenny on Thursday 25 December 2008 at 11:43 pm

Bookmark and Share

This is a simple 2D representation of a Rubik’s Cube written in Java. Its main purpose to be easily integrated with other software. I.e. A Rubik’s Cube solving Neural Network. Therefore, the UI is not extremely eye catching. But it serves a good test to demonstrate that the software is working. Later implementations will better support NxNxN cubes.

The Jar file can be downloaded here: Rubik’s Cube.jar Just click it to run it. If you have any problems running it, check to ensure that Java is correctly installed on your machine.

Rubik's Cube 2D java Rubik's Cube 2D java

RubiksCubeGUI.java

RubiksCube.java is the main wrapper class to Cube3D

RubiksCube.java

Cube3D.java

Each of the 27 cubes that make up a standard 3×3 Rubik’s Cube, I call a Cubit.

Cubit.java

Cube3DTest.java

Share on Facebook

Load Neural Network Training data from XML (PDF)

Posted under Artificial Intelligence, General Development, Neural Networks, Programming, Software Development, XML by Kenny on Thursday 25 December 2008 at 10:05 pm

Bookmark and Share




Share on Facebook

Neural Network - Load Train Data from XML - Java

Posted under Artificial Intelligence, General Development, Java, Neural Networks, Programming, Software Development by Kenny on Thursday 25 December 2008 at 9:52 pm

Bookmark and Share

This Neural Network is a command line implementation that uses the Back-Error Propagation learning algorithm. The main difference with this model is that all train data is loaded from an external XML file.
The Train data specification can be found Here.

The Zip file containing the Jar file and traindata directory can be downloaded here: NN.jar
Below is the Syntax for running NN02.jar in a command line:
java -jar NN02.jar [num center layers] [num center layer neurons] [learning rate]
An example includes:
java -jar NN02.jar 1 50 1.5
Which specifies a neural network with 1 center layers, 50 neurons per center layer, and a learning rate of 1.5. If now parameters are supplied it runs with default parameters.
Once executed, it should give a display similar to the image below.

The neural network Source is almost unchanged from a previous example found Here
Included in the zip file is my custom, and very very messy, XML Parser. If you plan on using any of this code for any real development, I recommend using a standard XML Parser. :)

Share on Facebook

Next Page »

Copyright © 2009 www.Ken-Soft.com