Wednesday, February 3, 2016

Awesome Guy 02.03.2016

The latest update fixes a bug that kept scores from being saved correctly. Another bug kept the player from winning on level 11. Both bugs were fixed (I think). I need to play until I accumulate a very high score to test out the score saving bug.  I'll do that over the next few weeks. The funny thing is that I think no-one is playing the game, so it doesn't matter if the scoring isn't saving properly. I do believe I have fixed the problem though.

Monday, January 18, 2016

Awesome Guy Update 01.17.2016

I updated Awesome Guy. The changes include a new level that I would call a BOSS level. There's no single bad guy, but it is the last level (level 11) and it is in some ways harder than all the other levels. Because not many people play the game I will describe what the level contains here. Spoiler alert.

There's no exit and no keys. What you have to do is to get each of the four 'seeds' one after the other and then deposit them in the spinning circle at the center of the level. You can tell that you've gotten one of the seeds because your character is transformed. Now it has a spinning circle around it. Yes, many spinning circles on screen at once. Now, to maneuver you must hold down the jump key while pressing the arrow keys. This will allow you to move over to the center of the screen to get rid of the seed. If you don't do anything when you are transformed you will float upward and eventually hit the top of the level. If you let this happen you will die.

The monsters can still kill you, so watch out.

There are four seeds on the boss level. If you get all four seeds into the goal at the center of the screen you can tell all your friends that you won. The game does allow you to start at any level you like, though, so you need not play all ten of the first 'normal' levels in order to get to the boss. You can go to the options menu on the Players page and simply select level 11 and you can play (and win) the boss.

There are some other changes to the game. Most important is the Google Leaderboard. The leaderboard has been part of the game since the 12.27.2015 release, but now the leaderboard has been enabled by default. When you first open the app it will ask you for an account to use for the leaderboard. You can disable this, and re-enable it later if you want, from the options menu on the Players page.

Monday, December 28, 2015

Awesome Guy Update 12.27.2015

I updated and re-released Awesome Guy. The most important change is a small one to the rules of game play. Now, when you want to exit the level and go to the next level you need the key that you find somewhere on the level. Only if you have the key is the crystal enabled. The crystal -- the marker on the screen to exit the level -- is white if you don't have the key, and blue if you do have the key.

If the level has a key, the crystal starts out white. When you get the key the level the crystal turns blue. Touching the white crystal does nothing. Touching the blue crystal takes you to the next level. If there's no key on the level, the crystal starts out blue.

There are some other changes to the app also. First off, the game now uses Google Leaderboards to keep track of scores. Also the button layout in landscape view has changed to something more intuitive.

The updated version was released December 27, 2015.

Wednesday, November 11, 2015

Hacking Awesome CNN

I have been working on making it so that the average hacker can duplicate the creation of the 'AwesomeCNN' app, and thereby change and enhance it if they want. Below is the list of items interesting to those interested in reproducing the app.

The basic usage scenario follows. First you download the project and the project's dependencies. Then you get access to the training data sets. Then you train the neural networks to obtain weights and biases for your app. These weights and biases are what will allow your app to recognise letters and numbers. Then you copy those weights and biases to the proper folder in the project directory. Then, making sure that you have 'python-for-android' installed and running properly, you build the android app.

  • The code is available on github at the following URL: It is largely based on the code at another site on github, at the following URL:
  • Both projects use 'scikit-learn' which can be downloaded easily using pip. Simply type 'sudo pip install scikit-learn' (without quotes) and the package will install on the typical ubuntu system. This will allow the programs to train on your desktop using the mnist image set. This is important for numerical character recognition.
  • The awesome-cnn project also trains on the alpha-numeric images found in SD-19, which you must obtain on your own if you want to try out recognition of alphabetic characters.
  • Training works as follows. Download the project to a workspace directory. This would be a directory in your home folder called 'workspace'. After downloading you should have the project in a folder called '~/workspace/awesome-cnn' and you should change directory to that folder. ('cd ~/workspace/awesome-cnn' without the quotes.) The python module is located in a folder called 'module'. change directory to that folder. Here there are several scripts for training your set of weights and biases. Run the scripts '' and '' . These scripts take parameters, so take note of the 'usage' output that is shown when you run the scripts without params, and modify your usage accordingly.
  • Training on all this data can take days. After training is complete you should have weights and biases for your app. Build the app using the script for that purpose found in the project folder. There are two scripts, one using the old python-for-android toolchain, and one using the new toolchain. As of this writing only the old toolchain script works. Running the old toolchain script takes ten minutes or so. It is called ''. After that you should have a working android app.

The project is, obviously, still under development. When the app can be built using the new toolchain more information will be posted.

Tuesday, September 22, 2015

Awesome CNN Usage

Awesome CNN is an android app that employs a convolutional neural network to recognize simple drawings of letters and numbers. The app was written originally for the linux desktop in python, and was ported to the android phone using kivy. It borrows heavily from another python project on GitHub called "nnet". It runs in python in the "Python-for-Android" environment. At the time of this writing it is also a project on GitHub, called "awesome-cnn". The git repository is almost in a state of completion, so it may be several months from this writing before you can download the project yourself and modify it. However, the android app on the app market works. This post describes how to use it.

First you must download the android app to your phone or tablet. From my experience tablets work better. You want a device that can crunch numbers (a high cpu speed) and you want a device that has a large screen and an accommodating aspect ratio. For this last spec, you want something that is not arranged so that half the width is the height. For example, 16:9 is sort of hard to use because half the height is almost exactly the same as the width. This does not effect the processing power of the app, but it does affect how the buttons are currently displayed on the screen, and so effects usage. In any case, tablets may work best.

Once you have the app on the phone or tablet, open the app. The app takes a long time to load, but then your screen will be arranged as follows. Half of the screen will be blank. This blank area is the upper portion of the screen. This area is blank so that the app might be used as an android "Input Method" some time in the future. For the time being this blank area is simply not used. The lower portion of the screen contains a large central area and two smaller panels of buttons on the left and right. Initially there is a small text area in the lower portion of the central panel. There are three buttons on the left and three buttons on the right. Again, not all of them are used. Some are sort of reserved for the possibility that the app becomes an Input Method after some continued development.

The basic idea is simple. You pick, using the top-right button, weather you want to work with alphanumeric characters or numbers. Then you draw on the center panel with your finger the shape of the letter or number you want the app to recognize. Then you press the 'ENTER' button on the bottom left of the screen. Then you have to wait for about 15 to 30 seconds. When the program is done it displays the recognized digit in a second small text area at the top of the center panel.

There is a 'CLEAR' button on the left side that works and two arrow buttons, for right and left, that do nothing. As stated above there's an 'ENTER' button on the left and a toggle button for choosing alphanumeric ('A') or numeric ('#') input on the right. There is also one other button that is blank at the time of this writing on the left above the 'ENTER' and 'CLEAR' buttons.

The two text areas are not sensitive to touch input. The bottom one floats on top of the input area and shows the current coordinates of input on the screen. It also shows the value of the last figure that was recognized by the app. The other text area, located at the center of the entire screen, and slightly higher on the screen then the input area, shows the history of the recognized digits by the app. This area is not visible when the app is first launched, and only starts to show digits or characters as the user draws them and then presses 'ENTER'.

Sunday, August 30, 2015

Awesome CNN

This app (Awesome CNN) is a work in progress. It's large and unwieldy and doesn't work predictably all the time, but it is an example of a 'Convolutional Neural Network'.

The app was written in Python. It is tuned to recognize either numbers or letters, but not both at the same time. In truth it is terrible at recognizing letters and only slightly better at numbers.

The source code for the neural network used is available on Github at the following url:

This is the url for the original project which is tuned for only digits. That task is more reasonable than the one that I tried, which is to tune the NN to various alphabetic letters.

Hopefully in the near future I will publish the source code for the android app, and then I will update this blog.

All Titles From David Liebman

From this point forward I'm going to use this blog to support all of my android titles. You will be able to find out about any of them here, I hope, from this point on.