Hacker News new | past | comments | ask | show | jobs | submit login
Raspberry Turk (raspberryturk.com)
140 points by sohkamyung on April 1, 2017 | hide | past | favorite | 27 comments



Thanks for the reference to Edgar Allan Poe's essay on the Mechanical Turk, that was a fun read. So right about some things and so wrong about others :)

""" The Automaton does not invariably win the game. Were the machine a pure machine this would not be the case — it would always win. The principle being discovered by which a machine can be made to play a game of chess, an extension of the same principle would enable it to win a game — a farther extension would enable it to win all games — that is, to beat any possible game of an antagonist. A little consideration will convince any one that the difficulty of making a machine beat all games, is not in the least degree greater, as regards the principle of the operations necessary, than that of making it beat a single game. """


Wow, my project is on the front page! Happy to answer questions if anyone has them.


It looks amazing! How is actuator travel distance which compensates differences between the heights of the chess pieces implemented?


It's hard-coded at the moment. I just measured the height of each piece and stored the values.


To me it looked like the clearance height was the same for all pieces. Is it actually dynamically calculated for each move?


Ah yes clearance height is the same for all pieces, the servo raises the piece to the piece height + the "resting" height. Relevant code can be found here:

https://github.com/joeymeyer/raspberryturk/blob/master/raspb...


Can you comment on the safety aspects of the design? It seems possible that the robot arm could collide with the arm of the human player, or that an unlucky player's finger could get caught in the robot's elbow joint as it closes.


Maybe don't stick your finger in the robot.


The design of the system requires the player to put their hand in the robot arm's work envelope in order to make a move, so in order to follow your advice one would have to avoid playing the game, which seems a shame.


The robot actually moves much slower than the speed in the video, so it would be hard to get caught without trying. The servos are also weak enough that they wouldn't be able to really hurt you.


Unless it's a physical limitation of the motor, "moves slowly" is still risky, because a programming error could cause the robot to move unexpectedly quickly in an unexpected direction! But "motor too weak to cause injury" is a good safety feature.

The project looks really nice in the videos, by the way — it must have taken a great deal of effort to get it working so smoothly.


Have it listen for j’adoube and fold up out of the way


Congrats for such a great project! Does the robot can promote pieces by itself?


Thanks! No at the moment the robot just places it's pawn the last rank. You have to watch the status page on screen to see what it promoted it to. Definitely need to come up with a better way to do that.


Awesome project joey, the documentation was neat.


The documentation on this is an awesome read! What were the costs associated with this build? What would you do differently the second time around?


The robotics components were the pricey part. The breakdown is something like this:

  - Table (w/ paint, wood, pipes, lights, etc): less than $50
  - Electronics (Raspi, camera, cables, electromagnet, microcontroller, etc): about $150
  - Robot arm (structural components + servos): $350
It's hard to say what I would do a second time around since there are aspects I still want to work on, I want to write my own chess engine for it!


I've been talking for a long time about making one of these - though my idea was to put magnets in the pieces and drag them across the board from underneath. Any advice on getting started with robotics? I'm fairly comfortable moving servos attached to wheels around, but I'm a little more hesitant when it comes to things with fixed range of motion.


What will you do when a knight needs to jump over a row of pawns?

As for advice, I'd look into implementing an xy table with an electromagnet. You can find many open designs from the 3d printer world. You will probably want hard limit switches at the end of each axis for alignment.


My plan was to space the pieces out so I could move the Knight down the lines between the pieces. Inelegant, but simple.


You may find this useful/interesting/inspiring: https://www.kickstarter.com/projects/1199521315/sisyphus-the...


I'm fairly sure I saw a machine that did it with magnets many years ago. But it's such a vague memory that I wasn't sure I didn't imagine it.

Found a video of one: https://www.youtube.com/watch?v=BobOCMj1Qhs


I considered moving pieces via magnet underneath the board as well, but decided to go with the arm to remain more true to the original Turk. The robotics was the hardest part of this project for me since my experience is software not hardware, but I found the resources on the ServoCity website to be incredibly useful.


Very nice documentation.

I notice that your confusion matrix for piece classification contains about 10-20% error still. Is that a problem in practice? And any ideas how to improve upon it?


The error was too high so I haven't integrated it into the actual code base yet, so it hasn't been a problem in practice yet! Ha. Yes I think the best thing I can do will be to collect more data, I am hoping that will close the gap a bit more. Also, I haven't spent that much time tuning hyperparameters.


Thank you for such a fun and cool project, but please do take into consideration the comments others have made about being sure it's safe: at least if you plan to make a bunch of them and sell them :)


Glad you enjoyed it! I don't have plans to make more and sell them, but the robot is safe–like I mentioned in the other comment it actually moves slower than the speed it does in the video and the servos aren't powerful enough to significantly injure someone.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: