Could you beat a chicken at Tic-Tac-Toe?
A Chicken? Seriously?
"I was eating in a Chinese restaurant downtown. There was a dish called Mother and Child Reunion. It's chicken and eggs. And I said, I gotta use that one."
- Paul Simon -
The year was 1977.
My chicken machine adventure started innocently enough.
It all began when an engineer I worked with asked a question.
"How'd you like a little side job?"
Joel and I worked for a small company in Rose Canyon. I had only been at Sym-Tek for a month or two. It must have been long enough for Joel to have come to respect my programming skills.
A Chicken? Seriously?
Image courtesy of Idella Maeland and http://unsplash.com
I was foolish enough to take the bait.
"What did you have in mind?" I asked.
Sym-Tek was Joel's day job. But he was a moonlighter...
By night, Joel ran Cove Electronics, a small consulting operation in El Cajon.
"I have to get a chicken to play tic-tac-toe," Joel replied. "You're going to write the software to make that happen."
Don't Stop The Carnival...
Image courtesy of Tim Gouw and http://unsplash.com
What in the world is a chicken machine?
The machine was to be a custom device that would make the rounds of county fairs and carnivals. That machine, or one like it, eventually made it to Las Vegas.
Have you ever met
a chicken psychiatrist?
Seriously, that's a real thing. It was up to the chicken psychiatrist to train the chicken to operate the machine.
That may not have been as hard as it may sound; you see, the chicken didn't really know how to play tic-tac-toe. The chicken psychiatrist trained the chicken to peck at a flashing light.
When it pecked the light, tripping a switch, the chicken was rewarded with a few grains of corn.
That's right; the bird worked for chickenfeed.
So did I, for that matter. Joel had promised me a hundred bucks on completion of the job. That's $400 in 2017 dollars. Not the road to riches, but a nice chunk of change for a young father with a growing family.
I didn't really care.
It was my first consulting gig ever.
Even more important, it was a fun project, a real kick.
I had my work cut out for me.
Speaking now as the computer:
I received a "start" signal when the player dropped a coin in the box. I had to light nine independent "O"s for the chicken moves, and nine "X"s for the human moves.
The chicken always played first. At appropriate times, I blinked a light to prompt the chicken to make its move.
When the chicken pecked at the light, a switch tripped and I stopping the blinking. The player then selected his move by pressing one of nine pushbuttons, which I had to "de-bounce" and note the player's move.
After each game was completed, I triggered a solenoid to release a few grains of corn — the chicken's reward for playing.
I also continuously blinked the same "X" and "O" lights between games — now representing the outcome of the last — to attract the next
Did the chicken really play?
Well, yes it did. My sense of honesty required it. But, How?
While waiting for the chicken, I kept the computer in a loop, counting possible moves. When the chicken pecked at the flashing light, I had the computer register the current move as the chicken's choice.
There were two selectable modes:
"Chicken Never Loses" and "Player Might Win." The mode was selected by a switch in the back of the machine, accessible only to the machine owner/operator.
Joel built the circuitry...
Image courtesy of Steven and http://pixabay.com
Sometimes, those choices turned out to be brilliant.
Surprisingly, the chicken won more often in the "Player Might Win" mode of operation! So much for conservative strategies. Frustrated players would keep dropping quarters into the machine, hoping to recover from being embarrassed in front of their girl friend.
The job was finally finished.
While I don't remember exactly how much time I spent, I know it was a lot.
After all was said and done, I think Joel felt a little guilty about that. When he handed me a check, my jaw dropped.
My check included a bonus. (Original image, @creatr)
The check was made out for $200.
"Hey Joel! You told me this was a $100 job."
"Yeah, but it took a lot longer than I expected. You did a great job. You deserve it."
I guess I made out alright.
That's almost a grand in 2017 dollars... plus whatever I earn from writing this story. 😉 (You are going to help me make this go viral, right? Send it right to the top of the trending list?)
Apparently, a Tic-Tac-Toe playing chicken is quite a curiosity.
Enough so that machines like this have proliferated. Videos of their operation have been preserved for posterity. I believe that the video below may be one of the original machines that Joel built and that I programmed. If not, it is a very close descendant.
In the video, you can see most of the machine operations that I've described.
You are why I'm here on Steemit!
I have very eclectic interests and hope, over time, to write about them all.