4 ms·
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 o
by swanson 15y ago
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.
- wahnfrieden 15y agoA 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.gif http://en.m.wikipedia.org/wiki/File:Knight%27s_tour_anim_2.g... :)
- alttag 15y agoKnights 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.
- tmhedberg 15y agoNor will you ever find both bishops of one color on the same color square.
- benjoffe 15y agoYou 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).
- deleted 15y ago[deleted]
- matthiasb 15y agoDamnit!!! I did not think of that! It is a good one.
- matthiasb 15y agoThanks 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
- danohuiginn 15y agoattach 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.
- cjy 15y agoGood 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.
- orijing 15y agoThe only thing I can think of is that pawns cannot be in the first rank nor the last rank.
- matthiasb 15y agoWhat 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
- dagw 15y agoYou 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).
- BasDirks 15y agoPawns 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.