Checkers playing arm

Just finished a school project, and it works fine.

I have modified a checkers game by adding a asynchronous socket for the RIOS software, and also webcam capture and image processing. The movements are predefined in RIOS as projects, picking a piece, placing it on a square are all projects, so basically the game tells RIOS what moves to play and the transitions are made automatically.

That’s a fantastic project!

If you’re so inclined, please elaborate on how you implemented it, and perhaps have Beth post it as a project!

Are you determining the locations of the checker pieces with the camera/vision system?

What “checkers game” did you modify?

Alan KM6VV

That looks great! Please give more details on how you did it. I say A+. :smiley:

Hi,

Congratz with this awesome project! Very well done! I agree with Alan, more info about this project would be very interesting to see.

EDIT: And welcome to this forum!

first of all, sorry for my romanian-ised English.

  1. The checkers game: 3dkingdoms.com/checkers.htm

  2. The position of the the pieces is determined with a color average algorithm. Every webcam frame is converted to an 8x8 color matrix containing the color average for every square on the board. If that changes it means that there is movement. After the movement stops, the matrix is compared to an already stored one ( obtained by clicking sample at the beginning of the game). Since I’m only interested in the white pieces, I am searching for changes in the amount of “green” (because red pieces don’t have any green) .
    So, on the square where there is a surplus of green means that is a new white piece, and on the square where there is less green a white piece is missing. When these to conditions are met it means that a piece was moved and the board. The stored color matrix is changed with the new values( the same thing as clicking sample).

  3. The arm movement is strait foreword. I have created 64 small projects in RIOS, picking and placing for every black square. So, if i want to pick a piece from square 5 and place it on square 8 for ex. I’m telling RIOS (via socket) to play projects “src5” and then “dst8”.
    I tried to avoid the troublesome of positioning the arm (from code) for every movement since there are lot of repetitive movements.

Nicely done! 8)

Thanx to all for your comments :slight_smile: if anyone has trouble implementing the checkers game I will gladly help.

Also I am working now on a real-time tracking robot using a pan and tilt kit, if anyone wants some starting tips for fast image processing I can help.

Your English is quite good! And your synopsis of the arm actions quite well written as well.

What camera are you using? CMU? Blackfin?? RoboRealm is free with the Blackfin. I haven’t tried RIOS, or an LM Arm. Maybe I will!

I take it the the moves in RIOS are then “canned” (learned), or did you develop them from IK calcs?

Thanks for the URL.

Looking forward to hearing more about your project!

Alan KM6VV

I’m using a Logitech QuickCam Pro for Notebooks (Logitech 2 MP Portable Webcam C905). The movements are learned (there are steps that record the joints position, and RIOS makes the transition between those recorded positions).

Is there any website for this project? Is that a stock “D” arm or is it piece meal? (i.e. did you purchase individual parts to make the arm?)

Well done. Very impressive!

The software and hardware work nicely together. Really great project. The response time was great.

No, there is no website for this project, sorry. The arm is a hybrid, I first bought a SES arm with wrist rotation and then I have replaced the shoulder and elbow servos with two HS-5745MG’s, so now it is more of a AL5D arm :slight_smile:.

Bumbac, i love this arm.
I’m not a programmer, nor much of a builder.

But i’m always full of ideas.

I thought of a way you could speed up the process.

Use painted magnets.
radioshack.com/product/index … Id=2102641

Then use an array of reed switches inside the board. Or something similar.
I’m not sure how you would set it up.
But i’m sure it can be done.

The checker playing arm would always know which spot has a “checker” on it, and it can be programmed to remember what each type is.

Checkerboard games lend themselves well to vision.

The checkerboard image is “normalized” and corrected to a flat plane, then the rows and columns can be imaged. The image can also be simply divided by math. Once all the “cells” are known, the cell can be checked for the presence or absence and the color of a checker.

With the location of the checker known (might want to calculate the centroid), IK arm calculations get you to the board to pick-up or put-down a piece.

This is were the fun is!

Alan KM6VV

Definitely right about the vision thing.
I can definitely see how that works.
The reed switch would have been a better choice for a fast paced game.
The program would not need to snap a picture and compare differences, it would simply read the changes in the active/inactive reed switches.
The Arm wouldn’t even need to go back to it’s default position, since it would no longer get in the way of the sensing device, in this case the camera.

I still think it’s awesome, i wouldn’t mind giving something like this a try, but instead of checkers, i’d make a 2 arm vacuum gripper… Black jack arm! Or 1 arm with 2 vacuum grippers that could flip a card upside down.

Can probably even make it accept coin money, and then pay out coin money.
It would accept coin money via the arm, and pay out via an automatic coin dispensing machine.

A BlackJack playing 'bot!

I like that idea. Lightweight arms can pick up cards quite easily.

So how ya gonna shuffle cards? Dealing could be simple, off the top, one card at a time.

Vision could do quite a bit here, looking up the cards!

Alan KM6VV

Build two Blackjack robots… One as a dealer and the second as a player. Invite guests to join in.

Mark the cards so that humans can’t read the markings but the robot player can…

Have the robot player play a combination of perfect strategy, card counting and a little cheating - amaze your friends! …or possibly p— them off.

:smiling_imp:
dj

Like KM6VV said, computer vision is really fast for this kind of project and the matrix of switches is already used in some computerized chess games without the aid of robotic arms : youtube.com/watch?v=QJADuhQA … re=related

But of course magnets could be useful for speeding up the game. Small rare earth magnets can be inserted in the wood pieces and also in the board, so pieces could center themselves instantly in the middle of the squares when placed down. In my project, the pieces are sometimes placed with a positioning error and if I don’t correct it myself the positioning errors add up towards the end of the game, and that can be very troublesome.

An electromagnet can be also used instead of the gripper. Magnets are a really great idea, thanks :slight_smile:

The Blackjack robot would be really, really hard to build and program, would have to use multiple vacuum grippers on the arm… can’t really imagine how.:smiley:

Automated card shuffler.
Cheap on the internet.

The arm could have an array of 4 suckers. and would pick up 1 card per sucker, with a rotational servo.
This would easily allow 3 players + the dealer. A comfortable number.
An upwards facing camera could quickly read the cards face. And a downwards facing camera able to see the forward facing sucker.

Have custom cards made. The values are the only thing that matter, not the symbol. So the card could have a large number with only it’s value on it.

simple buttons at each players seat would decide where you hit, stand, split, double, or insurance. Or since it’ll probably be connected to a computer, just use voice recognition, built into windows XP and higher.

Just use money slots like in vending machines. Could probably gut the mechanisms from actual broken down vending machines.

Put it in a bar or lounge and a single person could casually watch over it.
It may not be the most efficient way to have a black jack game, but it would draw a lot of attention.
Especially if you give it’s vocal replies a cowboy accent, and possibly put a cowboy hat somewhere on it.

Vocal replies being,
(Would you like to hit or stand?)

If you chose to split.
(Please insert X amount of money into the slot)

In reality i could probably make the hardware for this for $3000. It wouldn’t be super fancy, but it would work. I just wouldn’t be able to program it.
People would play it, just for the novelty of a robotic dealer.
Depending on location, it could possible pay for itself in a couple months, with $1 to $5 bets.
After that, it’s all profit, + you could design these for casinos.
1 Security guard watching 8 screens could replace a bunch of dealers.

Edit: Also for your checker table. use a center opposite polarity magnet in the center, and 3-4 same polarity magnets in the corners.
Now then, the budget tight person i am, i wouldn’t leave you with a $100 magnet idea.
dealextreme.com/products.dx/category.1105

There you could get a couple hundred NIB magnets for <$20. Heads up though, their shipping takes a couple weeks. to a month.
And if you order a BUNCH of magnets:
Lets just say, my mail delivery lady hates me for ordering a 2+ pound NIB magnet. Only had about 1" of padding around it. Long story short, we had to team up to get it off her metal shelf in the mail vehicle. It only cost $10 with free shipping, i couldn’t pass it up.

Here’s a vision approach to playing checkers that I came across:

classes.engr.oregonstate.edu/mime/spring2010/me414-001/g4/soft.html

Alan KM6VV