Have anyone used Encog for Java and GWT (Google Web Toolkit)? If you have what issues if any have you experienced? If no one have used Encog in GWT then I can use this thread to report my use with it.
Have never tried it, but I would be very curious to see what you come up with.
Some time has passed since I started this topic. Encog uses a lot of java classes and methods that is not understood by the JRE Emulation in GWT. I looked into just using Encog's source code and making an extension that would contain a subset of Encog's classes. If anyone has been successful in doing this I would appreciate your comments.
It is nice to read that someone would be interested in this sort of thing because I have spent a few days chasing this down.
What I have now is a maimed version of Encog Core that can run (at least) XORNEAT compiled with GWT. My focus has been solely to see if it could work, and I chose an example that I was most interested in using if it did.
If you are interested in knowing if a specific example (still) works, tell me and I would be happy to find out.
Could you explain the changes you had to make or provide a copy of the XORNEAT example?
I will upload the code here: https://github.com/MichielVdAnker/gwtcog
This is the XORNEAT example rewritten for GWT (made recursive to print the epochs to screen as it goes):http://pastebin.com/0hpT9ySV
This list shows the kind of errors I encountered. This list was saved about 2/3 in the process so there were many more to fix:http://pastebin.com/zZmCzU4i
To get your own list of errors you should do the following:
1. Create a new GWT project.
2. Copy encog-core packages into the .shared package
3. Start the compiler with the -strict flag
The most errors came from Object.clone() not being supported. This was easily fixed in cases where it just wanted to copy a int or double, but harder where it wanted to copy entire Networks using serialization. I had to disabled the latter function entirely but that did not break anything so far.
Other errors were about java.util.concurrency classes. Classes with this issue have been made mostly hollow. I imagine that WebWorkers could be used at some point so these classes may still come in handy.
StringTokenizer could not be used so those parts have been rewritten using String.split(). NumberFormat is unavailable so I've disabled it. Restoring the formatting using a custom helper is a //todo at this point.
Everything concerning storing files (e.g. the persistence classes) had to be disabled. I would like to restore this feature with a browser based approach.
Overal, the biggest damage I've done is deleting the encog.core.app and encog.core.bot packages entirely. I felt they would distract me from bringing the XORNEAT example online.
ActivationFunctions used to be created using Reflection, so I created a static factory method that instantiates them from String.
RSS YouTube Twitter Facebook github LinkedIn
Copyright 2013 by Heaton Research, Inc.
Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer