Can I use API to create and play custom games

Ah right - I thought the whole purpose was to share the spectating of the game… I guess it just depends what the goal is :slight_smile:

1 Like

I don’t follow… 3613 >>> 2562

1 Like

Oops, that should have been 2 moves per 3 bytes.

1 Like

I couldn’t reply earlier because I reached max allowed number of reply on the first day of creating the account XD

Having that offline capability would be a very interesting addition to the project. I didn’t know there are that kind of libraries available in the wild. I shrink the project down a bit because of my lack of Arduino and hardware knowledge XD right now the board’s job is to send coordinate string to a connected computer and the computer will take care of the rest, whether that be communicating with OGS server to do whatever it can or completing the game entirely offline with go libraries.

2 Likes

Sorry about that, generally Discourse does a good job of helping us maintain the community, but on occasion it gets in the way :smiley: I have bumped your account priviledges a bit so hopefully it won’t be a problem anymore. Nevertheless I did not reply further as you are getting more professional help than I could ever provide, but the project sounds very interesting, hope to hear more :slight_smile:

3 Likes

Do you need to code the go engine algorithm yourself if all you need is to convert sequences of move coordinates into sgf files? I think having the offline capability is great but not sure how straightforward it can be.

1 Like

You don’t really need a go engine to generate an SGF, but you might want to have some way to prevent illegal moves (ko, suicide, occupied intersections) from getting recorded, for which you’d need a go engine.

1 Like

That makes sense. Thanks for the info! There should be a lot of sgf writer tools out there. I’m currently exploring sgfmill python library. Hopefully this tool does what I need.

Hi I have yet another question for this project. At the moment, whoever wants to use the program has to create a new Oauth application to get the client ID. Is it possible that users don’t need to do that and simply provide their username and password? What are some of the negative consequences if I let people use the client ID I created? Is that even possible? Like are client ID bound to a username password credentials?

No, definitely not. You can use any user/password with the same Client ID.

It seems like this is low risk, but I’m not an expert and could be wrong.

From the oauth2 docs:

The client identifier is not a
secret; it is exposed to the resource owner and MUST NOT be used
alone for client authentication.

From the OAuth website:

The client_id is a public identifier for apps. Even though it’s public, it’s best that it isn’t guessable by third parties, so many implementations use something like a 32-character hex string. If the client ID is guessable, it makes it slightly easier to craft phishing attacks against arbitrary applications. It must also be unique across all clients that the authorization server handles.

Hmm I don’t quite understand why it shouldn’t be guessable if it can be public. If people can know what the client ID is then I guess I can hardcode it in the program. If not, people probably need to generate their own and store the value in the .env file.

1 Like

Hi folks I want to share the progress of this project because I’ve received so much help from this community and I’d like you to know without your helps the project cannot advance so fast

I am in the process of pushing the Arduino codes to my GitHub repo for those of you who want to have a look at the source code

This is just a prototype. It allows playing go in the upper left corner of a demo board, inside a tiny 4 by 4 area because I only have a 4 by 4 keypad. Someone from the Arduino forum helped me tweak the Arduino library to support 19 by 19 “keypad” so that’s what I will work on next.

This is the GitHub repo: GitHub - zoodiabloc/electronic-go-board

Here is the share link of the demo video: Microsoft OneDrive - Access files anywhere. Create docs with free Office Online.

4 Likes

Wow this is amazing progess, thanks for sharing!

1 Like

The key in the explanation is ‘arbitrary applications’ - say if a security issue came to light where a website accepted any token, and the client ID was only 5 numbers, you could try every possible client combination in a few seconds at best, even if you don’t know what applications are using them. With long client IDs, it would take a really long time to hit multiple applications by just exhausting the possibilities.

You can kind of compare it to a user ID for applications.

It isn’t really a secret at all - try logging into any application with your Google account and its client ID will be right in your URL bar.

2 Likes

Right the longer the ID is the harder it is to guess the right one.

Here is another update on the project. Placing physical stones on the circuit successfully register moves on the demo board! The video talks about the setup and a bit about what needs to be fixed still.

2 Likes

I got the basic feature to work:

Link to video

Right now only a 3 by 3 corner is working because of my lack of soldering skills. Will find a way to speed the process up and finish this entire 13 by 13 board, hopefully.

2 Likes

9 by 9 matrix is working now. Going to expand the same to the entire board soon. Also will look into reed switches and using magnet so I don’t need to poke holes on the board XD

3 Likes

Really cool! How does it work? I see the tinfoil is gone.

Side note: I think it should be able to show the moves without refreshing, when I watch a review I also don’t have to refresh the page all the time. :thinking:

Thanks! I still attach tin foil at the bottom of the pieces but now it’s a lot smaller than the pieces. It is essentially a keypad matrix. Every location on the go board is connected to the corresponding column and row wires based on its coordinates on the board. Arudino loops through all the row/column combination to send signal from one end to the other, in my case the direction is from row wire pins to column wire pins, and detect any closed switch. The switches are simply two conductive wires exposed on the board. The go pieces themselves are conductive as well. This is how the board and Arduino knows when someone places a stone.

If someone is clicking the demo board actively as they play the screen automatically refresh, but I think it’s different if it were a program that issue a new move to the demo board. I’d be very interested to know how I can get the auto refresh to work pro grammatically if you know how or someone who knows how to get that to work.

1 Like