News for hackers. Stuff that matters.
Re:Ask HN: What did you make during lockdown? by jstanley on Sunday June 21, 2020 @01:18PM (#23593444)
I made an automatic chess board that allows you to play with another person over the Internet (using lichess), but with a physical board. It has been described as "very lockdown chic".

Each chess piece has a magnet in the bottom. The board senses your moves by looking at where magnets disappear and appear, and it plays your opponent's moves by dragging them with an electromagnet underneath the board moved by a pair of stepper motors.

https://incoherency.co.uk/blog/stories/autopatzer.html

Re:Ask HN: What did you make during lockdown? by julianeon on Sunday June 21, 2020 @01:39PM (#23593648)
Have you considered Kickstarting this?

Your pitch could be: "like Regium, except it's not vaporware and actually works."

I mean that company had nothing and they were well on their way to raising 50k, before they were stopped. You have a real product. That $50,000 should've been yours.

https://thehustle.co/03092020-chess-kickstarter-regium/

https://www.reddit.com/r/chess/comments/fcfcpi/the_regium_eb...

https://www.kickstarter.com/projects/soontech/regium-automat...

Re:Ask HN: What did you make during lockdown? by jstanley on Sunday June 21, 2020 @02:38PM (#23594184)
Thanks, but it's really not a consumer-quality product, and I don't think I have the engineering chops to turn it into one. The frame is made by hand out of plywood. A lot of the wires inside are just taped in place. The Raspberry Pi takes several minutes to boot up to the game screen, during which time you can't interact with the board in any way, and you just get a load of Linux nonsense on the touchscreen.

It's also extremely time-consuming to assemble because of all the wiring required for the magnet sensors, and if you short one of the power connections, there's quite a lot of binary-searching over possible joints before you work out which one needs fixing. I would not like to make another one :).

If you want to buy a commercial one you should check out https://squareoffnow.com/ - it has the advantage that it is actually a product you can buy, but the disadvantages that it has no clock display, no button to confirm your move inputs, doesn't support lichess, and requires use of their smartphone app.

Re:Ask HN: What did you make during lockdown? by acs4u on Sunday June 21, 2020 @08:18PM (#23596401)
Working with a contract manufacturer should be able to alleviate those issues you're mentioning. Feel free to DM me if you have more questions. Awesome project!!
Re:Ask HN: What did you make during lockdown? by jstanley on Monday June 22, 2020 @04:41AM (#23598311)
I'd be interested in learning about how contract manufacturing works, although not necessarily for this particular project.

Hacker News has no DM function.

Re:Ask HN: What did you make during lockdown? by quickthrower2 on Sunday June 21, 2020 @11:09PM (#23597098)
That said I think the prototype doesn’t give you much more than starting with nothing in terms of a kickstarter. Other than the marketing advantage of being able to show what the eventual gameplay will feel like. But no head starts on the product itself that would need to be designed for bulk manufacturing.
Re:Ask HN: What did you make during lockdown? by bonchicbongenre on Friday June 26, 2020 @11:43PM (#23659363)
Just wanted to chime in saying I'd be very interested in purchasing one/supporting a kickstarter for a lichess-connected board — even if a bit hacky, it would still be wonderful
Re:Ask HN: What did you make during lockdown? by phuzybuny on Sunday June 21, 2020 @02:20PM (#23594030)
I highly recommend you upgrade to the Trinamic drivers! I modded my 3D printer that used the whiny A4988s with TMC2208s and the results are amazingly silent. https://www.reddit.com/r/MPSelectMiniOwners/comments/gsiai0/...
Re:Ask HN: What did you make during lockdown? by jstanley on Sunday June 21, 2020 @02:42PM (#23594213)
I actually did (half) do this since that post.

I bought one Watterott TMC2208 board and found that it was an easy drop-in replacement, compatible with my microstepping configuration, except the motor connectors needed flipping round else they ran backwards (if you're making a drop-in replacement for another product, and you have the option of making the motors move the same way as the other one, or the opposite way, why would you not just make them move the same way? the mind boggles).

Satisfied with this result, I tried to buy another one for the other axis but could not find another Watterott item on eBay, so ended up buying a no-name one, and it looks basically the same except something is weird about the microstepping modes, and I haven't been able to select a microstepping mode that is suitable, so I've given up on that for now. But at least I've got one quiet axis now, and if I come across a Watterott TMC2208 board, I'll know what to do with it :).

Re:Ask HN: What did you make during lockdown? by mellosouls on Sunday June 21, 2020 @02:00PM (#23593831)
This is brilliant, I've wondered for some time if something like this was available, it's a great way of linking the online chess boom with tradition, particularly for those of us who don't like staring at screens.

I wanted to build one myself, and it was only a complete lack of mechanical know how that stopped me.

I don't fancy bullet chess on it tho...

Re:Ask HN: What did you make during lockdown? by jliptzin on Sunday June 21, 2020 @02:39PM (#23594194)
There’s an online chess boom?
Re:Ask HN: What did you make during lockdown? by mellosouls on Sunday June 21, 2020 @04:59PM (#23595352)
Re:Ask HN: What did you make during lockdown? by karmakaze on Sunday June 21, 2020 @04:48PM (#23595285)
This is fantastic. I've wanted something similar for Go where it reads a physical board and sends the move to a game server. I don't know how it would place stones the remote player placed, or where this vast supply would come from.
Re:Ask HN: What did you make during lockdown? by ex3ndr on Sunday June 21, 2020 @02:56PM (#23594361)
I really recommend to replace drivers with TMC2208 one! They are plug in replacement and silent. You won't hear anything at all.
Re:Ask HN: What did you make during lockdown? by myroon5 on Sunday June 21, 2020 @01:26PM (#23593513)
How does it handle moves where pieces might accidentally hit each other like https://en.wikipedia.org/wiki/Castling and knight moves?
Re:Ask HN: What did you make during lockdown? by jstanley on Sunday June 21, 2020 @02:46PM (#23594259)
It uses a ridiculous bastardisation of Dijkstra's algorithm to work out the shortest set of operations to get the piece from where it is to where it needs to be. This includes a way for it to notice that it would like to run into another piece, and then add to the search tree a copy of the current node, but with some operations inserted at the start to first move that piece out of the way.

It's in here, but not for the faint-hearted: https://github.com/jes/autopatzer/blob/master/mojo/lib/Autop...

I did try giving it an accurate model of the acceleration curve of the stepper motors, so that it would do the set of moves that actually took the least time, but that led to strange motions where it would deliberately move pieces too far, and then back again at a diagonal, just to minimise the number of corners it needs to turn, so I instead just made it do a simple shortest-path, because it looks more natural to a human observer.

I.e. instead of going 2 squares right, then 2 squares up, then 1 square diagonal up-left, it would prefer to go 4 squares right, then 3 squares diagonal up-left. It takes less time, but looks stupid.

Re:Ask HN: What did you make during lockdown? by fpgaminer on Sunday June 21, 2020 @03:22PM (#23594599)
I'm having a hard time not crying over how beautiful this is. There's something so ludicrously satisfying about bringing our professional computer science hammers to bear on silly hobby projects. I love it. It's like being a kid again, where everything is just imagination and fun, but we get to finally play with the big boy's toys (like Dijkstra's algorithm).
Re:Ask HN: What did you make during lockdown? by alextheparrot on Sunday June 21, 2020 @01:30PM (#23593558)
In the video you can see it slightly moving a piece in the way to let the knight through
Re:Ask HN: What did you make during lockdown? by danappelxx on Sunday June 21, 2020 @01:36PM (#23593614)
Check out the video in the post they linked. Moves the piece slightly out of the way. Honestly incredible!
Re:Ask HN: What did you make during lockdown? by yasoob on Sunday June 21, 2020 @01:31PM (#23593569)
There is usually enough space between two chess pieces to easily fit a third one between them on these boards. So from my understanding the magnet just moves the third piece from between the two other pieces without hitting either of them.
Re:Ask HN: What did you make during lockdown? by jstanley on Sunday June 21, 2020 @02:49PM (#23594291)
I sized the squares on the board so that there would be enough room to slide a piece orthogonally between 2 other pieces, but was actually not able to make use of this property in the end.

The problem I faced was that when I had magnets that were strong enough to be reliably grabbed by the electromagnet, they were strong enough to repel each other if they got too close! I went through quite a large selection of different magnet sizes before I settled on the final one (which is 6mm diameter, 6mm tall, neodymium cylinders). They're strong enough to be grabbed by the electromagnet, and weak enough that 2 pieces can be in the centre of a square and a corner of the square without moving apart, but unfortunately still not weak enough that a piece can slide in a straight line past another piece.

When there is a piece in the way, it works out whether it would be shorter to move a piece out of the way, or to route the long way around, and picks whichever is shorter.

Re:Ask HN: What did you make during lockdown? by mcintyre1994 on Monday June 22, 2020 @04:16AM (#23598201)
This is so cool! Can it be set up to track both players in an lichess game as a spectator? I think that'd be pretty cool, having a self playing chess board as a display piece.
Re:Ask HN: What did you make during lockdown? by jstanley on Tuesday June 23, 2020 @06:33AM (#23612089)
The only reason it can't is that the Lichess Boards API makes you authenticate as a user and doesn't give you access to a game that you're not playing, which is a shame. I think the reason is to prevent people from surreptitiously setting up a separate program that will anonymously observe their game, run it through Stockfish, and tell them what to play.

If the player you want to spectate will set you up an API key, then yes it can do that.

Re:Ask HN: What did you make during lockdown? by alexyz12 on Sunday June 21, 2020 @03:10PM (#23594494)
reminds me of wizards chess in Harry Potter.
Re:Ask HN: What did you make during lockdown? by ericol on Sunday June 21, 2020 @06:14PM (#23595823)
William Gibson would be proud.

(Before anybody takes any offence on this, I really hope y'all read Johnny Mnemonic).

Re:Ask HN: What did you make during lockdown? by kvothe_ on Sunday June 21, 2020 @02:10PM (#23593921)
Fantastic!
Re:Ask HN: What did you make during lockdown? by celicaraptor on Sunday June 21, 2020 @01:43PM (#23593686)
Brilliant!
Re:Ask HN: What did you make during lockdown? by UweSchmidt on Sunday June 21, 2020 @01:22PM (#23593485)
That's amazing!