X0
Y0
Z0
J10
J20
J30
J40
Gripopen
X, Y, Z: the gripper's tip in mm on the board. J1 to J4: joint angles in degrees. Over a square: –
Move in a straight line
Turn one joint
J4 turns by itself to keep the gripper pointing straight down.
Teach
Add the gripper's position to your program as a line, or save it as a named point.
Full auto
Both robots play each other. They miss picks and knock pieces over, then fix the board themselves. The Cinema camera follows the action. Stop it at any time to take over White.
How clumsy a robot is when the computer drives it: in auto play, and the computer's own robot when you play.
Move hints
With hints, the game finds a good move for you and draws a green arrow. You still program the robot to make it.
Tidy the board puts every piece back exactly where the game says, if the robot knocked things over.
Moves
You play White against the computer. You don't touch the pieces: you program a robot arm to move them. The computer's own robot plays Black.
1. How a turn works
- Read the hint at the top: it says which piece to move and where. The green arrow shows it on the board.
- Write a robot program in the Program tab, or move the robot by hand in the Jog tab and add lines from there.
- Press Run. The robot runs your program line by line.
- When the robot finishes and the pieces stop moving, the game checks the board. If it matches a legal move, the computer replies.
Not there yet? Fix it with another program, or jog the robot. Nothing counts until the board shows a legal move.
Just want to watch? Start auto play in the Game tab: both robots play, make mistakes and repair them, and the Cinema camera films it.
2. The robot: joints and the TCP
Your robot is a full-size 4-axis industrial arm with about 2 m of reach, like the ones that stack boxes on pallets:
- J1, the base: turns the whole arm left and right.
- J2, the shoulder, and J3, the elbow: together they set how far out and how high the gripper is.
- J4, the wrist: turns by itself so the gripper always points straight down.
The TCP (tool centre point) is the point the robot steers: the middle between the two fingertips. Every position in a program is where the TCP goes.
The robot can't go everywhere. A point too far away, or too close to its own base, is out of reach, and the robot refuses to start that move.
3. Coordinates on the board
Positions are in millimetres in the board frame: the origin is the outer corner of square a1.
- x runs along the files, a to h.
- y runs along the ranks, 1 to 8.
- z is the height above the board.
Each square is 160 mm, so the centre of a1 is x 80, y 80, and e4 is x 720, y 560. You can write a square's name instead of its numbers: MOVEL e4 z=200.
Point at the board with the mouse to see the square and its coordinates.
4. Robot coordinates mode
Square names are a shortcut. A real robot knows nothing about chess: every position is a set of numbers in a frame (a coordinate system). Switch Positions in the Program tab to Robot coordinates to program it that way.
- Coordinates are in your robot's BASE frame: the origin is the centre of its base on the cell floor, X points toward the board, Y to the robot's left and Z up.
- The board's top is at Z=48, so the grip height is Z=104 and the safe height is Z=528. The centre of e2 is X=640, Y=-80.
FRAME BOARD switches to a user frame with its origin at the corner of a1 (the numbers of Chess squares mode). FRAME BASE switches back. Real robots use user frames the same way: teach the frame once, and points on a table or fixture stay simple.
- Point at a square to see its coordinates, and the hint tells you where its squares are.
- Most real programs use taught points: jog to the spot, Save point, then write
MOVEL P1. MOVEJ P1 dz=400 is an offset, 400 mm above it.
Each mode keeps its own program, and the computer's programs switch to its own base frame too.
5. Jogging and teaching
Real robots are often programmed by teaching: you drive the robot to a spot with a teach pendant, then save that spot in the program.
- Drag the blue ring around your gripper, or use the buttons in the Jog tab.
- Move in a straight line moves the TCP along x, y or z. Turn one joint moves one joint and lets you see what each joint does.
- Add MOVEL line writes the current position into your program. Over a square centre it writes the square's name.
- Save point stores the position as P1, P2… You can use it in programs:
MOVEJ P1.
The green cross on the board is right under the TCP. Line it up with the centre of a piece before you go down.
6. MOVEJ and MOVEL
MOVEJ (joint move) turns all the joints at once, each by the amount it needs. It's quick and easy on the robot, but the gripper travels on a curve.
MOVEL (linear move) makes the TCP go in a straight line. Use it near the pieces, where a curve could hit something: going down to a piece, lifting it, and moving across the board.
A good habit from real robot cells: MOVEJ for big moves through empty space, MOVEL for the last part.
7. Pick and place
Almost every robot job is a pick and place. It has the same steps every time:
- Open the gripper.
- Approach: go above the piece at a safe height.
z=480 clears the tallest piece (the king, 288 mm), even with a piece in the gripper.
- Go down straight with MOVEL to the grip height.
z=56 works for every piece.
- Close the gripper.
- Retreat: straight up to the safe height.
- Move across to the target, go down, open, and go back up.
Put the piece down low: if you gripped it at z=56, open at z=60. Dropped from higher, it can fall over and knock others down.
Don't go below your grip height while you hold a piece: the piece would hit the board and the robot makes a protective stop.
8. The gripper
- The fingers open 136 mm wide. Each piece is up to 112 mm across at the base.
- To grip a piece, the TCP must be within 24 mm of the piece's centre, and below its top part. Miss by more and the fingers push the piece instead, which can knock it over.
- Coming down on top of a piece, or moving low through other pieces, knocks them over too.
- A fallen piece can be picked up lying down: go to the middle of it, low (
z=80), and CLOSE. It stays lying in the gripper.
- To stand it up, set it down on your righting station, the small green table to the left of your robot (
station). It pops up the right way, and then you pick it up like any piece and put it on its square. Load "Stand up a fallen piece" from Examples.
- A piece that was pushed is no longer on its square's centre. Point at its square to see where it really is, and use those x and y values.
9. Routines
Writing the same ten lines for every move gets old. A routine is a named block of lines you can run again with different values, like a function:
DEF pick sq
MOVEJ sq z=480
MOVEL z=56
CLOSE
MOVEL z=480
END
DEF place sq
MOVEL sq
MOVEL z=60
OPEN
MOVEL z=480
END
OPEN
pick e2
place e4
HOME
sq is a parameter: pick e2 runs the routine with e2 in its place. Load "Routines" from Examples to try it.
10. Captures and special moves
- Capture: first pick up the piece you are taking and drop it in your tray (on your right), then move your piece to its square. Tray slots are
tray1 to tray16.
- Castling: move the king two squares toward a rook, then move that rook to the square the king jumped over.
- En passant: your pawn moves diagonally to an empty square, and the pawn it passed goes to your tray.
- Promotion: a pawn that reaches the last rank becomes a queen by itself.
11. Protective stops
Real robots stop at once when something goes wrong, to protect people and the machine. This one stops when:
- the gripper would touch the board, the cell floor or a tray;
- the piece in the gripper would hit the board;
- a point is out of reach, or a joint would pass its limit.
The log says which line stopped it and why. The robot stays where it stopped: jog it clear, or run a new program.
12. Chess in two minutes
- Pawn: one square forward (two on its first move). It captures one square diagonally forward.
- Knight: an L shape, two squares one way and one to the side. It jumps over pieces.
- Bishop: any distance diagonally. Rook: any distance straight. Queen: both.
- King: one square any way. It must never stay in check (attacked).
- You win by checkmate: the other king is in check and can't escape.
You don't need to know more: with hints on, the game tells you a good move every turn.
13. Language reference
MOVEJ point | Joint move to a point |
MOVEL point | Straight-line move to a point |
HOME | Joint move to the home position |
OPEN, CLOSE | Open or close the gripper |
SPEED 50 | Speed in percent (1 to 100) for the moves after it |
WAIT 0.5 | Wait, in seconds |
DEF name a b … END | Define a routine with parameters |
FRAME BASE, FRAME BOARD | Robot coordinates mode only: the frame for the coordinates after it |
name e2 e4 | Run a routine |
# text | A comment; the robot ignores it |
A point is a name with optional changes:
e4 | Centre of square e4, at the current height (Chess squares mode) |
e4 z=56 | … at 56 mm above the board |
z=480 | Straight up or down: same x and y as now |
tray1 … tray16 | Slots of your capture tray (Chess squares mode) |
station | The middle of your righting station (Chess squares mode) |
P1 | A point saved in the Jog tab |
here dz=120 | 120 mm above where the TCP is now |
x=720 y=240 z=56 | Exact coordinates in mm |
x=, y=, z= set a value. dx=, dy=, dz= add to it.
Everything runs in your browser. Your program, saved points and game are kept in this browser only.