Last Good Quote: Son's are the seasoning on our lives. - Someone on Facebook

Saturday, January 30

iPad and the Future of Computing

I believe that the Apple iPad represents the next step in the future of computing. A trite and often spoken phrase, but let me explain.

Right now, laptops, phones and pdas are all viewed as tools. When I want to do something "online", I go looking for my computer. The future is when using a computer or getting on the internet becomes as frequent and often as watching TV, listening to the radio or opening my fridge. It needs to become a thing that is a given, always there, always available and everyone has one. The iPad changes this by bring a computer within price range of the all Americans. This is said with the assumption that after the first year of release the price will half, like most other technical products.

The iPad also lowers the barrier to use. Humans have an odd trait that 80% of the time we will use the tool easiest available or soonest available rather than the best tool for the job. What ever tool has the least barrier to usage, becomes the one we use by choice.

Today, when I want to get online I have to go "find" and "turn on" a computer. Even if that action is as simple as opening a device and logging in. The iPad takes another step toward changing this. Here is a device that is always on, doesn't have to be "opened" and is more "available" then other internet connected device. (Excluding smart phones). It's light enough and small enough that I can leave it anywhere, my bed, the bathroom, the kitchen, the can just be with me as I roam my life.

Removing the keyboard as an essential part of the computer experience is a huge step. Apple started it with the iPhone and if they can truly enable keyboard less computing, it will dynamically change the way we use computers.

A note, I think netbooks set the stage for the iPad but I never felt that they were really the next step, they made computers cheaper but at the cost of quality. A good thing, but not necessarily an advancement in technology.

Friday, January 29

A Test in AI

I've been doing a lot of reading up on AI and I got to thinking...

Question: Is it possible to "grow" code that acts in an intelligent fashion?

So, I thought I'd walk a little test and see "what happens". However I have a "goal" that at some point watching these bots interact together should be 'interesting'.

I started with a map, a bot and a set of actions that the bot can perform.

  • 20 x 20 square
  • Going off one side of the map brings the bot to the other side of the map. (much like pacman)
Available Actions:
  • Move Up one square
  • Move Down
  • Move Left
  • Move Right
  • Look Left returns true if another bot is to the immediate left
  • Look Right
  • Look Up
  • Look Down
  • If(a, b, c)

  • a, b c - can be replaced by any other action except if
  • if a is true then b will be performed
  • if a is not true then c will be performed
  • Fight - Kills any bot within one square
  • Breed - See below
An example bot:

(This bot moves in a circle attempts to fight, then breed then it runs south)
0: Move("E")
1: Move("N")
2: Move("S")
3: Move("W")
4: Fight()
5: Breed()
6: Move("S")
7: Move("S")
8: Move("S")
9: Move("S")

How they Grow
Populate the map with 20 bots. Each of them selects 10 random actions from the list above. They then perform the actions in sequence. We are looking for some type of intelligent behavior from these bots.

Breeding is the key to the bots learning something. Any time a bot attempts to breed the following sequence takes place:
  1. Look for another bot within 1 square
  2. 5 times, take a random code from this bot and replace it with a random code from the other bot.
  3. Find a bot that is dead and has a lower score than either parent bot.
  4. Give the new code to this bot.

The primary bot, sometimes called father, is the bot that started looking to breed. (Hey, I'm a dude what can I say.)

The secondary bot, sometimes called the mother, is the bot that was found close by. (Sorry ladies)

Gross huh? or Cool, depends on how you look at it.

The other form of breeding could take place after the bot is dead for a given number of turns. When this is the case, the bots code is randomly mixed with random code and the bot is set alive again.


So, I needed a way to identify "good" behavior. I'm still on the fence if I can call it intelligent behavior. Either way, this is how I scored each bot.
  • +1 for Killing another bot (Survival of the fittest)
  • +1 for Breeding (father)
  • +1 for Help Breeding (mother)
  • +.25 for each tick that the bot stayed alive
Keep in mind that during breeding a bot can only breed if there is a dead bot of a lesser score on the board. This keeps a "dumb" breeder from taking over the board.

Other Notes

Age - Keeps track of the number of times the bot's code was "messed with"

Kids - Number of successful breeding attempts

Parents - The last two parent bots of the current bot.

Bots will block each others path, unless dead.

When a bot is re-spawn or the child of another bot, they are respawned at a random location on the map.

What's happening?
OK, so I ran the simulation with the following parameters:
  • 1,000 iterations (steps)
  • 20 Bots
  • Respawn after 20 seconds
  • +1 for Killing another bot (Survival of the fittest)
  • +1 for Breeding (father)
  • +1 for Help Breeding (mother)
  • +.25 for each tick that the bot stayed alive
These were the top 3:

Bot 12: 5 iterations, 18 kills, 1 kid, score: 248

This bot tried to fight, breed then moved east a little and tried over
  • 0: fight([BOT_ID])
  • 1: look('S', [BOT_ID])
  • 2: fight([BOT_ID])
  • 3: look('S', [BOT_ID])
  • 4: fight([BOT_ID])
  • 5: look('S', [BOT_ID])
  • 6: findMate([BOT_ID])
  • 7: move('E', [BOT_ID])
  • 8: move('E', [BOT_ID])
  • 9: fight([BOT_ID])
Bot 19: 2 iterations, 10 kills, 4 kids, score: 260
This bot moved diagonal across the board mating and fighting as it went. Died a lot while I was watching.
  • 0: look('E', [BOT_ID])
  • 1: fight([BOT_ID])
  • 2: move('N', [BOT_ID])
  • 3: findMate([BOT_ID])
  • 4: move('W', [BOT_ID])
  • 5: look('S', [BOT_ID])
  • 6: look('N', [BOT_ID])
  • 7: fight([BOT_ID])
  • 8: move('W', [BOT_ID])
  • 9: look('N', [BOT_ID])
Note: During this round the bot with the most code changes (13) had the following line of code:
5: ifOnly(look('S', [BOT_ID]),"move('S', [BOT_ID])","move('W', [BOT_ID])", [BOT_ID])
6: fight([BOT_ID])

Intelligence? He looks south if he sees something he moves south and then attacks. Otherwise he moves west.
Bot 12: 5 iterations, 13 kills, 1 kid, score: 230Very similar to the first test. This bot tried to fight, breed then moved east a little and tried over
  • 0: fight([BOT_ID])
  • 1: findMate([BOT_ID])
  • 2: look('S', [BOT_ID])
  • 3: look('S', [BOT_ID])
  • 4: look('S', [BOT_ID])
  • 5: look('N', [BOT_ID])
  • 6: findMate([BOT_ID])
  • 7: look('N', [BOT_ID])
  • 8: move('E', [BOT_ID])
  • 9: findMate([BOT_ID])
Bot 15: 4 iterations, 13 kills, 1 kid, score: 249
Moved a little differently, but overall moved east...a pattern might be emerging.
  • 0: ifOnly(look('E', [BOT_ID]),"findMate([BOT_ID])","look('E', [BOT_ID])", [BOT_ID])
  • 1: move('E', [BOT_ID])
  • 2: fight([BOT_ID])
  • 5: fight([BOT_ID])
  • 6: move('W', [BOT_ID])
  • 7: move('E', [BOT_ID])
Bot 7: 4 iterations, 27kills, 0 kid, score: 262
Very efficent use of code, notice how he spawned to kids to compete with him. Thus giving him the high score.

  • 0: fight([BOT_ID])
  • 1: move('N', [BOT_ID])
  • 2: move('S', [BOT_ID])
  • 3: findMate([BOT_ID])
  • 4: ifOnly(move('S', [BOT_ID]),"fight([BOT_ID])","fight([BOT_ID])", [BOT_ID])
  • 5: ifOnly(move('S', [BOT_ID]),"move('E', [BOT_ID])","look('N', [BOT_ID])", [BOT_ID])
  • 6: move('N', [BOT_ID])
  • 7: fight([BOT_ID])
  • 8: look('N', [BOT_ID])
  • 9: move('W', [BOT_ID])

Thursday, January 28

CSS Tip - Center a Div

For those that may not know...

To center a div with the following:

#content {
width: 700px ;
margin-left: auto ;
margin-right: auto ;

Width must be specified.

Now if only I could center a div that has an absolute positioning

What is RAM?

So the Hot One, my wife, comes to me the other day with a flyer in her hand..."Is this laptop a bargin?"

"Sure, but you'll need more Ram", I said.

"Why" says the 10 year old.

"It'll run faster", I answered.

Now, what most people want to know is "How much do I need", here is the short answer: 3GB.

And here is the long answer. Most people may vaguly remember that RAM is memory. However, I like to think of it as the ability for a computer to multi-task.

The more RAM a computer has the better it will be at multi-tasking. You see, each program and application you open will request an amount of RAM for its own exclusive use. This is ok, but at some point the computer has no more to give. Now, being a good tool, the machine does not stop working, but it does start running slower. And as you keep opening windows it will get slower and slower.

So in conclusion, the more RAM you have the "things" you can do with your machine without affecting the speed.

Like all rules, this one has an exception. Some programs when they load, go ahead and take up all available RAM. You know who these greedy beast are before you even fire them up...cause usually they are the only thing you have open. Examples would be: 3D games, Virtual Boxes and Development environments.

The other time that RAM really comes into play is on start up. The computer needs to start a million things at speed this up it constantly swaps part of the programs being started into and out of memory. The more memory you have the more it can switch and swap.

Here's a quiz for you... What can you do to speed up your machine, without spending money on new "hardware"?

By the Way: Join me in Charlotte, Feb 6th for the Annual HSCC Open House. We're teaching kids how to build Java websites this year. More Info at

Thursday, January 14

Today is Special

A little wiser and a little smarter.

I did a little artwork for myself...couldn't sleep last night.

Thursday, January 7

Why Flash is Not a PBBG

A lot of folks ask me what "games" I develop. I tell them I make Persistent Browser Based Games (PBBG), their eyes promptly gloss over and I promptly move along.

However, there are some few folks who know what I'm talking about. This post would be for those select few.

Flash games are not Persistent Browser Based Games.

A PBBG is the defined as the following (from
A persistent browser-based game, or PBBG, is a computer game that satisfies the following two criteria:
  1. It is browser-based. The game is played over the Internet using only a web browser.
  2. It is persistent. Progress in the game is achieved over multiple playing sessions.
PBBGs merge the depth and longevity of an application-based game with the accessibility and portability of a browser-based game. PBBG can be spoken as pee-bee for brevity.
Notice the explicit use of the word only .

Flash requires a plug-in, regardless of which browser a user uses. Thus it is out. Even if the game itself is "persistent". Now, flash can be an added bonus/feature to your game. But if a user needs flash to play your game then its no longer a pbbg.

Flash stay in your genre or make your own.

Why is this important to me?
PBBG is a different art from flash development. I like the fact that PBBG development requires you to understand all the three levels of web development. It also assist you in growing skills that can be used in a more "professional" environment.

Flash on the other hand, can more easily blur the lines in the three levels of web development as well as cut some corners on some fundumental development skills that professionals need.

If someone comes to me and says I've developed a PBBG...I can assess thier skill set pretty quickly. If someone says they've done a Flash game...well...I know a lot of easy ways to throw a flash game together.

Is it important to you that Flash games be excluded from PBBGs?

Tuesday, January 5

5 Interesting Sites for the Creativity Seeker

This site takes my breath away. Creative, beautiful and entertaining. It's not about a whole lot but still shows the power of what you can do with the web.
Expirements in Javascript
Click on one of the links, this guy has a bunch of experiments in Javascript and flash. Interesting stuff to play with and see just what you can do with Javascript.
Photoshop Tutorial Playground
Whenever I visit this site I always find something new to try and play with on my own. It's a list of links to tutorials on photoshop and image manipulations, but let yourself wander through the sites, they are all pretty good.
DIY Wonders
Wonderful things you can create all by yourself with a little ingenuity and creativity. Some technical related, some just fun to do. Again, I never fail to find something to try after reading this page.

I have an "Inspirational" and "Interesting" folder link, these sites sit in there. From time to time I bring up the folder and go visiting. Especially when I'm bored.

Where do you visit to kill time? (Excluding game sites, we all know how to find those.)