News for hackers. Stuff that matters.
Re:Show HN: My weekend project - Chessboard picture recognition by swanson on Thursday August 04, 2011 @09:12PM (#2848558)
I don't know anything about "chess theory" but are there some squares that only certain pieces can get to? I don't think it's possible for a Knight to ever be on some squares, so maybe you could use logic like that to narrow down the piece detection.

It may be easier to just track the game state from the start instead of trying to identify the position of the board at a random snapshot in time.

Cool project though, seems like a good intro to image processing.

Re:Show HN: My weekend project - Chessboard picture recognition by wahnfrieden on Thursday August 04, 2011 @09:26PM (#2848582)
A knight can in fact visit every position, without even revisiting any of them. Computing this is actually a classic CS problem. Here's proof http://en.m.wikipedia.org/wiki/File:Knight%27s_tour_anim_2.g... :)
Re:Show HN: My weekend project - Chessboard picture recognition by matthiasb on Thursday August 04, 2011 @09:58PM (#2848665)
Thanks for leaving a comment.

"It may be easier to just track the game state from the start instead of trying to identify the position of the board at a random snapshot in time."

This is certainly true! But the original idea was to take a picture (probably from a mobile phone) and continue the game online. Taking a picture after each most is a lot of work :D

Re:Show HN: My weekend project - Chessboard picture recognition by danohuiginn on Friday August 05, 2011 @07:50AM (#2849756)
attach a camera (or phone) to the clock. It takes a picture whenever you hit the clock (i.e. after every move), and records the move history. You can stop scribbling it on those little pads.
Re:Show HN: My weekend project - Chessboard picture recognition by BasDirks on Friday August 05, 2011 @03:03AM (#2849243)
Pawns can't be on the first or last rank (they'd have to be promoted). There are plenty of impossible (illegal) positions like double mate, and more complicated ones where for example there are two dark-colored bishops + 8 not promoted pawns. Perhaps that kind of info will come in handy when the image algo is in doubt.
Re:Show HN: My weekend project - Chessboard picture recognition by cjy on Thursday August 04, 2011 @09:59PM (#2848671)
Good point. Even though all pieces can be almost anywhere, the algorithm could use the probability of the pieces being in certain situations to improve it's guesses dramatically. This would be especially true if you told the computer whether the board was in the beginning, middle, or end game.
Re:Show HN: My weekend project - Chessboard picture recognition by alttag on Thursday August 04, 2011 @09:29PM (#2848589)
Knights can make it everywhere. The only position you'd never see is pawns on the first or last rank (their movement is forward and they promote to stronger pieces when reaching the other side).

EDIT: Another feature ... in a properly set up board, the bottom right square is always white.

Re:Show HN: My weekend project - Chessboard picture recognition by tmhedberg on Thursday August 04, 2011 @11:59PM (#2848916)
Nor will you ever find both bishops of one color on the same color square.
Re:Show HN: My weekend project - Chessboard picture recognition by benjoffe on Friday August 05, 2011 @12:36AM (#2848971)
You have to be careful there, you can only make that assertion if you can prove that no pawn has been promoted to a bishop (eg if all 8 pawns are still on the board, or 7 pawns and 2 queens etc).
Re:Show HN: My weekend project - Chessboard picture recognition by orijing on Friday August 05, 2011 @01:23AM (#2849050)
The only thing I can think of is that pawns cannot be in the first rank nor the last rank.
Re:Show HN: My weekend project - Chessboard picture recognition by matthiasb on Friday August 05, 2011 @08:43AM (#2849860)
What do you mean?? If you can get your pawn to the last row, you can change it to anything. You will probably want to change to a queen, unless you want to irritate your opponent :D
Re:Show HN: My weekend project - Chessboard picture recognition by dagw on Friday August 05, 2011 @08:47AM (#2849872)
You can get your pawn to the last row, but the pawn can't be on the last row, since it instantly changes to a different piece (and you can't change your pawn to a pawn).