Skip to main content

JavaOne 2013 Impressions #1: So, Who Needs a Chess-Playing Robot, Anyway?

Posted by editor on September 23, 2013 at 12:32 AM PDT

At the JavaOne 2013 Java Technical Keynote, there was a series of demos of software that enables two people to play chess, using some of Java's latest features, including Java EE 7 Websockets, many variations of Java 8 (recent weekly builds), Lambda Expressions, Java ME, Embedded Java, ... It was an impressive demo of many of Java's recently-released and not-yet-finally-released capabilities, which included the introduction of the DukePad, a home built tablet powered by a Raspberry Pi (cost of the components: about $300 US).

We saw the game played on various clients, including a seemingly not that powerful iOS tablet device, the DukePad, a modern laptop (with very fancy animated Dukes being the chess pieces), and a Raspberry-powered robot...

No, you're not misreading that, and I didn't mistype it. The final client for the app was a robotic arm, powered by a Raspberry Pi that was interfaced back to the exact same Java EE 7 server software that was used for all the other clients... This robotic arm responded to commands issued by the Raspberry Pi in response to the same JSON messages that all the other clients received.

An example JSON message instructing the client to move a piece identifies which color to move (white or black), the starting location of the piece, and the ending location of the piece. The locations are identified using chess algebraic notation:

The robotic arm is moved using a set of servomotors, motors that can be commanded to rotate to a specified angular location (including multiple revolutions). I did lots of work with servomotors more than 30 years ago, using a software and hardware setup that, at the time, cost hundreds of thousands of dollars!

But, I assure you, the robot constructed for the chess client demoed today at the Java Technical Keynote did not cost in the 6 digits of US Dollars! For example, the Raspberry Pi costs about $30, while the HP 9845s I was working on cost upwards of $30,000 back when I was programming what in essence were servomotor-powered robots...

Anyway, when a piece is to be moved to an unoccupied board location, the robotic arm (which is equipped with a clasping 'hand'), opens the hand, moves down over the piece, closes the hand about the piece, lifts the piece to an altitude above all the other pieces, moves to the new location, sets the piece down, unclasps its hand, and lifts away from the board.

Actually, that probably leaves you with an incomplete vision of this robotic arm. It actually has two hands, each located at the end of a rotatable lever that is pinned to the arm at its midpoint. Two hands are more convenient than one when you need to hold two objects simultaneously, right? And it's very convenient if you can do that when one chess piece conquers another. In this case, the arm picks up the piece that is moving, then flips that hand upward and flips its empty hand down. The empty hand picks up the piece that was conquered, then flips the conquering piece down onto the chess board position. After this, the conquered piece is placed somewhere off the board (I didn't notice where).

Cool, right?

"No!" you shout. "Who cares? How does this matter?"

I'll get into the answer to this question in more depth in subsequent posts. But first, remember my statement that 30+ years ago I was programming software for what was in essence a much simpler robot using equipment that cost hundreds of thousands of dollars? That software controlled but a single servomotor, using a $30,000+ scientific desktop computer that was controlling a GPIB interface (which itself cost beyond $1000, if I remember correctly).

So, cost-wise, we've reduced the expense of making a simple servo-controlled robot by somewhere between 1000 and 10000 times. And that's not even counting 30+ years of currency inflation. The hardware I worked on cost many, many multiples of my annual salary back then!

Now factor in time: it took me perhaps a year of programming (in HP's Rocky Mountain Basic, or RM-BASIC) to develop that simple, quite expensive robot, and a simple user text-based user interface with an X-Y plot. The time to program the robotic chess client was likely some weeks, I'd guess (and I believe this was indeed suggested by the demo team). So, you've reduced the software engineering time by a factor of, say (being conservative) 10.

Let's do the math:

[hardware cost reduced by a factor of 1000+ (3-4 orders of magnitude)]

Multiplied by

[software development time reduced by a factor of 10+ (1+ orders of magnitude)]

What's the answer?

My answer is: if you don't see a world-changing technology revolution in the making here, then... well... you're just plain not seeing the same tomorrow I'm seeing. So far, anyway...

But, there are still four more days of JavaOne to go!

Subscriptions and Archives: You can subscribe to this blog using the Editor's Blog Feed. You can also subscribe to the Java Today RSS feed and the blogs feed.

-- Kevin Farnham (@kevin_farnham)

DukePad-Front-Home-Screen-W_sml.jpg168.83 KB