go_away

Author Topic: Robot Using Computer Vision to Play Checkers  (Read 2621 times)

0 Members and 1 Guest are viewing this topic.

Offline parallaxTopic starter

  • Full Member
  • ***
  • Posts: 94
  • Helpful? 1
Robot Using Computer Vision to Play Checkers
« on: August 27, 2009, 09:59:24 AM »
*Note: I posted a very similar thread in Software but I misplaced it.  The topic has been merged with this one*

I have been playing around with ideas for a project and I would like to do something similiar to this:

[youtube]XhfGQGGFb68[/youtube]

There would be a few key differences:

1) The game would be checkers
2) It would implement a camera rather than other sensors to read the state of the board
3) It wouldn't be made of legos
 
My plan is to use blob detection so that the robot can distinguish where the individual pieces are, and then feed that information into a two dimensional array. To make it easier for the camera to distinguish the pieces, I plan on marking the checkers with different colored pieces of paper. For example: all of the black checkers would have a yellow piece attached to the top, and all of the red ones a blue piece (the colors are arbitrary, I imagine, as long as they are different enough from the board or the pieces themselves).

A possibility (depending on the feasibility) would be to mount the camera on a servo so that it may swivel. This would allow the camera to initially be pointed at the player's face and implement facial recognition so the robot would realize who it is playing against. I imagine sitting down to play it and hearing "Hello Christopher: would you like to continue our last game?"  :D But that's neither here nor there for now. My main concern is getting the robot to play a decent game of checkers...

I was also playing around with the idea of an electro-magnet rather than a gripper/manipulator to pick up the pieces. I imagine a small piece of ferrous metal embedded in the underside of the game piece would allow it to work. Seems like a gripper/manipulator might complicate things. My only fear would be EMI...

My questions are:

Does anyone foresee any problem with this setup? Any thoughts, input, criticism or ideas on the premise? Advice?

Also:

Servos, stepper motors, or some other ingenious method for moving the gantry? Have my own ideas but are very interested to hear what you suggest.

Thanks in advance  ;)

« Last Edit: September 10, 2009, 07:16:42 PM by parallax »
"Less than a drop of blood in me remains that does not tremble;
I recognize the signals of the ancient flame"

Offline flimflap

  • Jr. Member
  • **
  • Posts: 18
  • Helpful? 1
Re: Computer Vision to Play Checkers
« Reply #1 on: August 27, 2009, 12:16:26 PM »
I would say place the camera directly above the board. That way you dont have the problem with the board being in an angle to the board.
And black and red are pretty easy to tell apart, so i don't think you'll need the coloured paper.

Goodluck!

Offline parallaxTopic starter

  • Full Member
  • ***
  • Posts: 94
  • Helpful? 1
Re: Computer Vision to Play Checkers
« Reply #2 on: August 27, 2009, 12:27:04 PM »
Thank you!

My reasoning behind the colored paper is a situation like this:


Black checkers on black squares... could pose a problem? Even if you were to set up the checkers on the lighter squares rather than the darker ones I would be worried about the human opponent not placing their pieces accurately enough (i.e. the checker being off-center) and the robot not registering the piece correctly. Or worse, not registering the piece being there at all.  
« Last Edit: August 27, 2009, 12:29:50 PM by parallax »
"Less than a drop of blood in me remains that does not tremble;
I recognize the signals of the ancient flame"

Offline flimflap

  • Jr. Member
  • **
  • Posts: 18
  • Helpful? 1
Re: Computer Vision to Play Checkers
« Reply #3 on: August 27, 2009, 01:23:06 PM »
lol! totally forgot that! It's been a while since i played checkers. A piece of coloured paper would do fine. Otherwise you would have to look at the shape of the play piece.
A diffirent coloured gameboard/gamepieces would be fine too. As long as the colours dont match too much

Offline parallaxTopic starter

  • Full Member
  • ***
  • Posts: 94
  • Helpful? 1
Robot Using Computer Vision to Play Checkers
« Reply #4 on: August 28, 2009, 11:40:59 AM »
No worries!  :)
« Last Edit: September 10, 2009, 07:13:48 PM by parallax »
"Less than a drop of blood in me remains that does not tremble;
I recognize the signals of the ancient flame"

Offline parallaxTopic starter

  • Full Member
  • ***
  • Posts: 94
  • Helpful? 1
Re: Robot Using Computer Vision to Play Checkers
« Reply #5 on: September 08, 2009, 11:21:45 PM »
(post deleted by author)
« Last Edit: September 10, 2009, 07:15:08 PM by parallax »
"Less than a drop of blood in me remains that does not tremble;
I recognize the signals of the ancient flame"

Offline Ro-Bot-X

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,431
  • Helpful? 25
  • Store: RoBotXDesigns.ca
Re: Robot Using Computer Vision to Play Checkers
« Reply #6 on: September 09, 2009, 05:50:29 AM »
I started to build  Lego Tic-Tac-Toe robot, but before I could complete it and participate to that competition in Indiana, I had to leave US. At that moment I had 2 concepts: a gantry style robot (cartesian coordinates) and a polar coordinates arm style robot. Because of the complexity of an arm done in Lego, I chose the first style. If I had the choice to build a regular robot, I would have chosen the arm, because I can use servos for all joints and the gripper. But this design also brings more software complexity because it is hard to position the gripper at the exact coordinate of the piece needed to be moved. However, I would go with this design, it is an excellent exercise for a vision coordinated pick and place robotic arm. If you do it, please share the code, as many of us would like to implement the arm movements in our butler robots. As far as the arm design, a Lynxmotion arm or Crustcrawler arm would work fine. The camera would work easier if mounted on the arm, but a lot more realistic if mounted on a pan/tilt head. Since there are a few ways to built a PC bot small enough, it makes sense to use RoboRealm and a regular webcam, but even a CMUcam or a Blackfin cam could do the trick, and I feel the Axon has enough power to do all the necessary number crunching.
Check out the uBotino robot controller!

Offline parallaxTopic starter

  • Full Member
  • ***
  • Posts: 94
  • Helpful? 1
Re: Robot Using Computer Vision to Play Checkers
« Reply #7 on: September 10, 2009, 07:08:46 PM »
Thank you for your input! Those are all great suggestions, and have inspired me to try the polar coordinate arm style with my robot.  ;D

I am in the process of researching some of these different possible combinations and will post back here as soon as I have a definitive plan. Programming a passion of mine and I will be happy to post my code when I am done. Good to know that I may work on something that will have some real value to contribute to the community here. Perhaps that would make a good tutorial?   

"Less than a drop of blood in me remains that does not tremble;
I recognize the signals of the ancient flame"

 


Get Your Ad Here

data_list