Getting opponent's moves in coördinate form.

Sort:
janmetdepet050

A friend and I are trying to make a chessboard that is able to move the opponent pieces and register your own moves. We now only need to have the information of the opponent in coördinates form, for example: a2-a4. Then we need to get this in our Arduino so it can move the piece.

Does anybody have any idea how we could do this? We aren't very advanced programmers so the simpler the better!

stephen_33

I think you may be trying to run before you can crawl? I use Python quite a lot and I've looked at this briefly before but I'm not much wiser.

You might want to take a look at this because it seems to be what you want, although I haven't been able to make much sense yet of how the presenter creates the standard chess board...

https://www.youtube.com/watch?v=wQLMRwnBINE

It's a little fuzzy on my laptop.

PlayerMark

Could you be a little more specific to what your use case is? Do you already have some information on the opponent move and just need to convert it to coordinates or?

stephen_33

First, do you have any experience of any programming languages such as Python?

I don't know of any off the peg apps that provide the kind of functionality you want, so I think you're going to have to build it for yourself using available tools such as Python chess or pygame.

My use case? As I said, I haven't got into this myself before although it's something I might try to develop - a Winter project I think.

binomine

This club is for the developer API, rather than developer's in general....but....

A chess board has 64 squares, which means you need 64 identical sensors, which gets pretty costly pretty quickly.   

You may want to start with 1D chess variant or Minichess rather than going to full chess.

If you want to move the pieces, you're going to need a robot of some sort to move them.  I'd hold off on it for now. A lot of professional boards that do what you are asking use lights to indicate an opponent's moves.  That is significantly cheaper and easier to do.

~~~~

Now, professional boards will detect pieces and then infer. So if a2 is empty and a4 is full, then we can assume the piece moved from a2 to a4. 

Professional boards usually put magnets in the pieces and use magnetic sensors. 

You could also put aluminum foil on the bottom of your pieces and wire the board so that places a piece on the square completes a circuit.  Another option is to get some heavy pieces and place membrane buttons under the squares, so that pieces will depress the button.

 

stephen_33

I missed the 'Arduino' reference and thought this was intended to be a virtual chess-board, not a physical one. Good luck with that project!

ImperfectAge

I think the coordinate form is also known as UCI format.  This API for Python is pretty useful and can convert moves from PGN standard notation to UCI.

https://python-chess.readthedocs.io/en/v1.6.1/index.html

Citolo

I'm trying to do something similar, but as somebody said, you need to crawl before jumping hahaha, In my case I'm trying to use a Console with a python script to play chess, the problem is how I can send the information of the move, and I think the most hard part is how I can get the info of the oponnet to print a message of the move in the console. I think there are some sort of APIs going around but i don't know if they allow you to manipulate an Online game.
If somebody have more information, like if the API allows you do that or what methods in that API get/set the info, Would be huge.

stephen_33

The existing API is referred to as a REST API which means the facility is 'read-only'. In other words we may download data but not upload it!

There were plans I think to expand it to include more interactive activities but they haven't come to anything as yet.

Martin_Stahl

Also, the ability to make moves in the interactive API very likely will be strictly limited and won't be open to general use.