Introduction: Team Pong

Searching for a mathematical excuse to play a nice game of pong with your friends ?

Statistical theory says that in general, the error in an average is smaller than the error in a single observation. This also holds for decisions. Hence, playing pong with several players holding the racket together should increase the performance.

In 'Out of Control' chapter 2 Kevin Kelly describes an experiment carried out by Loren Carpenter, where an audience of 5000 people play pong using red and green cardboard wands ('Out of Control - Chapter 2' ). Carpenter also experimented with a flight simulator, where  the audience learned to land the aircraft in two or three trials. This is much faster than the time it generally takes one single person to learn to fly a plane.

The project Team Pong is inspired by the work of Carpenter, not the flight simulator, but rather the pong game.
In this project two groups of one to ten people can play against each other. By recording the number of players and the scores the theory of Carpenter can be proved.

This instructable describes how to setup this Team Pong project.

Step 1: Joysticks

First step is the construction of the joysticks. In total you need twenty of them, for each team ten connected to each other.
The schematic diagram above shows the interconnections.

The joystick construction is rather simple. It consists of a string of resistors which are switched on or off by the players.
Each player has one small box with two buttons, a normally on black push button to move the bat up. A normally off red push button to move the bat down.
A resistor of 1k ohm is soldered over the switches. When no button is pressed the total resistance of the box is 1k, (1k of the red button + 0 ohm of the closed black button).  When the red button is pressed its resistor is shorted resulting in a total value of zero ohm. When the black button is pressed (opened) the total value is 2 kilo ohm. By connecting ten individual joysticks in a string, the total resistance ranges from 0 to 20k ohm.

Note that when one team member presses the red button and the other one a black, the action is canceled out, which is the main idea of this project.

Step 2: Interface

Then we need an interface which converts the resistance of the joysticks to a numerical value in the computer software. In this case a cheap usb data-acquisition interface is used, with, amongst others, eight analog inputs (ADC). (only two are needed for this project)

Any interface with two analog inputs is suitable. This one was selected because it includes a nice .NET  interface library, which makes it easy to implement in the pong software.

The joystick strings are connected over the analog input, with a pull-up resistor to +5V. This results in a quadratic relation between the resistance and the ADC voltage. In the software this is converted to a linear change in bat velocity.

Step 3: Software

As with all modern projects, software is the most important part.

Starting point is a tutorial with C# source code from Microsoft (http://channel9.msdn.com/coding4fun/articles/Upgrade-Your-Game-TinyTennis-C ).

The most important adaptation is control of the bat by the ADC values in stead of the keyboard. Since the data acquisition board comes with a .NET library this was not a very challenging task. Some extra functions are added to modify the bat velocity based on the ADC value read. The non linearity of the resistor value is linearized by taking the adc value squared. Tolerance in resistors is handled by a adc_center value which can be set from the user interface.

An input control window is added. Here the user can choose how the right and left bats are operated. It is still possible to use the keyboard, or play against the computer. Also the number of players right and left can be set. There are input fields for the ADC center values as described above and the number of rounds for a complete game.

Some other bells an whistles are added such as a nice tune and picture when the game ends. Furthermore the ball speed is slightly increased each time it hits a bat.

Finally for each game the number of players, which group won and the final ball speed is recorded in a log file. This way after a large number of games, statistical analysis on this data can be used to prove the theory of Loren Carpenter.

(the source code of this project will be available on request)

Step 4: Playing the Game

Finally play with your friends and have fun.

(don't forget to do the statistical analysis afterwards)

Nostalgia Electrics Ultimate Party Challenge

Participated in the
Nostalgia Electrics Ultimate Party Challenge

game.life challenge

Participated in the
game.life challenge