The Cabinet of Wisdom VI — Learning About Machine Learning

The Cabinet of Wisdom

Part VI: Learning about Machine Learning

Hexapawn is a simple game, simple enough that the mathematician Martin Gardner used it in famous column from the March 1962 issue of Scientific American to explain the basics of what is called machine learning to the public.

Let us establish at the outset that machine learning is not learning nor anything like learning, any more than a bootprint in the snow is like the booted Mountaineer Mailman from Maine crossing a snowy field. “Machine learning” is the phrase used when a machine is designed with several possible outputs of several different priorities, such that prior test-runs have altered the current outputs or priorities.

But first, let us mention the greatest invention of mankind.

An Ignorant Thermos

Once I heard a comedian say that the greatest invention of mankind is the thermos bottle! He was asked why. “Just think! The thermos bottle keeps hot liquids hot and cold liquids cold!” The comedian placed a finger alongside his nose. “How Does It Know?”

The reason why this is a joke, is, of course, that thermos bottles do not know anything.

The thermos is not a manservant instructed, when he sees warm liquids, to keep them warm, and to cool what he sees to be a cold liquids, and so he must make a judgement about each liquid as it comes before him, and decide which of two voluntary actions to perform. The thermos or vacuum flask slows the heat exchange by which liquids take on the temperature of the environment.

It is just a way of expressing that thought to refer to it as if it were two different actions, keeping hot liquids hot and cold liquids cold. No decision making is involved. No learning is involved.

Likewise, no learning is involved in machine learning. This is merely a misleading expression. It would be less misleading if it were called something like “output alteration” or “prioritization” rather than “learning.”

Hexapawn, however, is a simple example of what is misleadingly called machine learning. It is a particularly clear example because, in one sense, there is no machinery.

Hexapawn

Hexapawn is a game played on a tic-tac-toe board, with three white and three black pawns. The pawns start on the first row, and move and capture as in chess, but without either an initial double move nor an en passant rule. The player wins who promotes a pawn to the final row, or whose foes are all captured or unable to move. In other words, stalemate is a win for whomever moved last.

White moves first. You play white.

                    Hexapawn is the new Tic-Tac-Toe

There is, however, no player for black. Instead, take empty matchboxes whose covers have been inscribed with colored arrows showing each legal black response to each legal white move. Place inside each matchbox beads of the same number and color as the arrows.

                 Game Calculation Engine Made of Matchboxes

Here is a diagram view:

         The Diagram Shows Black’s Moves on turn 2, 4 and 6.

On black’s turn, close your eyes, shake the matchbox, and draw out a bead. Black’s move is indicated by the color. If the resulting move is a losing move, do not return the bead to the matchbox. If a winning move, add another bead of the same color. If neither, let the beads remain in the matchbox in their current numbers.

Play again.

After fifty iterations, black wins every game.

This is because, after fifty iterations, the number of losing beads is winnowed down to zero, and the number of winning beads increased to unity.

Closing your eyes when drawing out a bead is merely to add the thrill of the unknown, and increase the illusion that there is a second player, making unpredictable moves.

In reality, there is no second player. You are playing solitaire.

A Systematic Pastime

Technically speaking, you are not playing a game at all. It is a pastime.

This pastime consists of using a systematic routine to sort through every possible combination of moves and responses to weed out the losing moves. One might even call it a mechanical routine.

If you peek, and deliberately select beads that stand for winning moves or losing moves, you will either increase the number of winning beads or decrease the number of losing bead more quickly and surely than someone who closes his eyes: but the result will be much the same.

Or, you can take the same diagram of possible moves above, add the possible white moves, and arrange them in a decision tree on a piece of posterboard, and use a pencil to cross off losing moves.

                      This is as far I got ere angry chessbots stormed my office. Feel free to continue.

Or, you can just can just do the whole thing in your head, by visualizing each possible move and countermove like a chessmaster.

But that requires rare powers of concentration. Somewhere in the two dozen possible boards and half a hundred possible countermoves, you might lose track. So better to use the matchboxes and beads.

The matchboxes and beads serve as counters to help you keep your place.

That is all.

They are not thinking, not pondering possible moves, not making any voluntary actions. They are certainly not learning, not properly so called.

For that matter, matchboxes and beads are not wagering on the outcome of any Hexapawn tournaments. The matchboxes are not even aware that they no longer hold matches, which was once their sole purpose, nor do the beads yearn to be threaded on necklaces to grace the throats of fair maidens.

They have no desires, no internal reality, at all.

When they are being used as tool to keep track of wins and losses, they have a final cause, that is, a purpose. Otherwise not.

Please note a significant fact about Hexapawn: it is entirely mechanical game, or, rather, pastime. The moves are unambiguous, and can be valued as win, loss, or neither. No judgment as to the meanings of symbols, no creative effort to define a word, or find a word on the tip of your tongue, no latitude of interpretation or misinterpretation is involved. No umpire is needed.

The act of identifying white’s last move, presenting black’s countermove, and eliminating losing moves from future iterations or duplicating winning moves, are all things you, the player, do deliberately albeit in a routine, that is, a mechanical way.

You are deliberately acting non-deliberately. But because these acts are all mechanical, they could be mimicked by a mechanical process.

You can be replaced.

The Cunning Cabinet

To see how, instead of matchboxes, let us have a cunning cabinetmaker make a cabinet that performs the same task in the same way.

Instead of a pile of matchboxes, let each cabinet drawer on its face show all the board combinations of the second, fourth and sixth turns, and each drawer contain the possible countermoves.

The white player can signal his move by means of working a lever to open the appropriate drawer representing that move.

Let each drawer contain a cogwheel with each tooth triggering one possible black countermove. When the drawer opens, the cogwheel turns, and one tooth representing the black countermove is presented.

An escapement or similar mechanism can ensure each possible countermove is actuated in turn, or, to create the thrill of the unknown, and the illusion of a second player, let the cogwheel be spun like a roulette wheel as the drawer opens, so that not even the cabinetmaker knows, in any given case, what countermove will be presented.

Let a losing move disengage that cogwheel, and engage a cogwheel shy one tooth, so the new wheel lacks the losing move. Likewise, a winning move will replace the previous a cogwheel with one where the winning move appears twice, so that the roulette spin is more likely to present it.

For convenience, let a three-by-three Hexapawn board be built into the cabinet’s polished brass and wood top. Let each square of the board be a window, such that a wheel beneath each can be rotated to present either a black pawn, or a white pawn, or an empty square.  A move rotates two wheels, turning the formerly occupied square to empty, and turning the formerly empty square to a pawn; a capture turns one color pawn to the opposite. The board wheels are connected to the drawers by mechanical linkages, to switch cogwheels when losing and winning moves are made.

Again, after fifty games, the cogwheels will be configured to end every game in a stalemate (which, in Hexapawn, is a win for black).

Now, as a matter of simple logic, if our cabinetmaker can make a cabinet able to rotate through all the moves of the black player for Hexapawn, he can do the same for the white.

Let second cabinet like the first be contrived, except that the drawers now hold all the boards combinations and responses for the first, third, and fifth moves. Simple linkages can interconnect the levers operating the black cabinet drawers with the white, so that a given move automatically provokes a countermove. All that is needed is a masterswitch to set the game in motion.

In a burst of creative ambition, let the cabinetmaker connect the masterswitch to the final move, so that all fifty games can be run through one after another in one long clattering session of cogwheels turning, levers moving, and drawers sliding open and shut.

The two cabinets will play through every combination of the game. If the roulette wheel option is used, the order in which the games are played varies, and if not, then the games are played in the same order.

After fifty trials, every game ends in a stalemate. (Which, in Hexapawn, is a win for black.)

The reason black always can force a stalemate is that,  in Hexapawn, moving first is a disadvantage. If the opponent makes no error, the disadvantaged player cannot recover. There are, of course, games where moving first advantages the player.

Meaningless Roulette

It is important to note that the roulette wheel has no function in this process, other than to keep the cabinetmaker in ignorance of the order in which his mechanism will run through its quite limited number of possible combinations.

The randomizer, despite what you may have heard, neither suspends the law of cause and effect, nor renders the material universe indeterminate, nor grants free will. It is a mechanism used to limit what the cabinetmaker knows, so that he knows which of four (or fewer) countermoves a given move will provoke, without knowing which one.

If the matchboxes and beads used in Hexapawn to help you keep track of the possible move combinations in this simple game are neither thinking nor living, then, by the same token, neither is the Hexapawn cabinet, not even when the cabinetmaker steps aside, and merely lets the mainspring run down by itself.

Like a row of dominoes falling, everything thereafter is a thoughtless and lifeless reaction of mechanical elements in motion.

It is not a thinking process, but it is a tracking process that tracks a thinking process.

Please note that such a cabinet tracks and can only track a mechanical thinking process, namely, a process lacking any ambiguity, following rigid rules of logic.

Please note, that, in theory, nothing prevents the cabinetmaker from making a larger cabinet with a four-by-four board and eight pawns, creating a game called Octopawn.

Larger cabinets could be established to run through all possible move combinations of other games, like tic-tac-toe, paper-scissors-rock, checkers, go, or chess.

The New Jerusalem Cabinet

The chess cabinet is fundamentally no different from the Hexapawn cabinet. It differs, however, in size and complexity. A mathematician tells me that there are 400 possible board combinations in chess after white and black make a first move. After the second, there are 197,742 possible, and after three moves, 121 million. As of the time of this writing, no chess computer has actually run through all the possible combinations of all possible games.

Hexapawn cannot last past six moves. The longest official chess game on record 269 moves between Ivan Nikolic vs. Goran Arsovic, Belgrade, 1989. The game ended in a draw.

We can assume a chess cabinet would be a cube fourteen thousand miles on a side, with countless myriads of drawers reaching beyond the atmosphere, needing the entire resources of a worldwide empire to create and staff, with armies of engineers merely to keep the wheels, linkages, and joints oiled and in repair. Instead of a mainspring, the rotating nickel-iron core of the planet will power the escapement.

It would perhaps be as large an arcology, as foreseen by Paolo Soleri, or as large as New Jerusalem descending from the clouds adorned as a bride, as foreseen by St. John, covering half a continent, with Earth’s meagre stratosphere gathered around it knees, with global positioning satellites colliding with its upper battlements.

Many chess games could be bolloxed or misplayed because of gypsy tribes secretly living amid the mile-wide cogwheels of the Nimzo-Indian defense or the Queen’s Gambit Declined.

Hundreds of miles above, there are endless drawer levels of miserably amateur endgames representing a single knight and two pawns chase a lone enemy king around a nigh-empty board, where endless cubic acres of cogwheels in serried ranks holding each dull variation sit motionless and cobwebby with inaction. Such unlikely strata of the New Jerusalem Chess Cabinet are rumored to be haunted by ghosts from wrecked space stations. Expeditions dispatched to these arid areas have vanished without a trace.

As with Hexapawn, the New Jerusalem Chess Cabinet could be designed to eliminate or deprioritize the last move of any losing games, so that the cabinet will present fewer losing game combinations on reiterated trials.

It would, of course, save millions of years of trial time merely to put in place the cogwheel combinations of all prior recorded games of grandmasters, so that the cabinet will not present the possible moves of game combinations already known to lead to loss.

And, again, the simple brute force approach of the New Jerusalem Chess Cabinet can be made more elegant if the cabinetmaker consults with an army of chessmasters to find shortcut linkages bypassing entire decision-branches, or establishing cogwheel combinations to address only a part of a board or a game, such as a group of dedicated drawers that operates whenever castling is called for, or to avoid check, or to grant priority to chessmen during swaps, valuing queen above rook and bishop, knight above pawn.

Please note, and note especially, that in the cases of special dedicated drawers designed to make smaller decisions within larger decisions, it is the cleverness of the cabinetmaker, or the chessmasters he consults, which is on display. No more than the beads and matchboxes of Hexapawn, is the New Jerusalem Chess Cabinet itself engaged in any thinking process.

As before, whether the New Jerusalem Chess Cabinet uses a roulette wheel spin to randomize its cogwheels, or merely marches through the cogwheel turns one tooth at a time in order, means nothing. The use of the randomizer, as before, is meant only to hide from the cabinetmaker the knowledge of in what order his cabinet will run through its available drawers and their cogwheels.

Halt States and Imitation Games

Chess, unlike Hexapawn, may or may not have a halt-state, that is to say that, unlike Hexapawn, the game logic of chess may or may not lead always to a stalemate.

If so, using the roulette wheel option will make the contests more like flipping a coin, because if the first move is advantageous for white, and no moves are in error, white will stalemate black, and if it is disadvantageous, black will stalemate white.

Compare dead-end games like tic-tac-toe, which a simple cabinet, after a few games to eliminate the losing moves, will always stalemate its foe, to open-ended games like paper-scissors-rock, which has no final winning combination.

The unfortunate paper-scissors-rock cabinet eliminates any losing move from future iterations. Hence, two thirds of the time, whoever wins the first round of paper-scissors-rock will win the second as well, after which the opposing player can only stalemate or lose.

Dead-end games can be counted through all variants by a cleverly-made cabinet to discover an undefeatable combination of tactics that always wins or stalemates. Open-end games have no undefeatable tactics because the logic of the game does not allow for it.

Now, what if we run the Imitation Game, as envisioned by Alan Turing, through the New Jerusalem Cabinet instead of a chessgame?

To answer this, let us turn from the New Jerusalem Chess Cabinet to the Chinese Room of John Searle.