Python version of CGOS by Zakki

An abstract strategy board game for two players
Rémi Coulom
Posts: 219
Joined: Tue Feb 12, 2008 8:31 pm
Contact:

Re: Python version of CGOS by Zakki

Post by Rémi Coulom »

After moving in the game history, the board becomes dirty:
Image
Rémi Coulom
Posts: 219
Joined: Tue Feb 12, 2008 8:31 pm
Contact:

Re: Python version of CGOS by Zakki

Post by Rémi Coulom »

I tried to reconnect after interrupting the script and got this error: CGOS Error: You are already logged on! Closing connection.

It seems the server does not track disconnection well. Here is the log:

Code: Select all

2023-01-29 01:25:36,886 - INFO: Shutting down CGOS connection
2023-01-29 01:25:47,986 - INFO: Chose engine 1 ("crazy_test") as next player. Switching and re-connecting.
2023-01-29 01:25:50,172 - INFO: Attempting to connect to server '203.138.189.63', port 6819
2023-01-29 01:25:57,472 - INFO: Connected
2023-01-29 01:26:00,778 - DEBUG: Server sent: protocol genmove_analyze
2023-01-29 01:26:00,778 - DEBUG: Responding: e1 cgosPython 0.3.1 beta genmove_analyze
2023-01-29 01:26:01,054 - DEBUG: Server sent: username
2023-01-29 01:26:01,055 - DEBUG: Responding: crazy_test
2023-01-29 01:26:01,329 - DEBUG: Server sent: Error: You are already logged on!  Closing connection.
2023-01-29 01:26:01,329 - ERROR: CGOS Error:  You are already logged on!  Closing connection.
2023-01-29 01:26:01,330 - DEBUG: Responding: quit
Rémi Coulom
Posts: 219
Joined: Tue Feb 12, 2008 8:31 pm
Contact:

Re: Python version of CGOS by Zakki

Post by Rémi Coulom »

Another connection problem:

Code: Select all

2023-01-29 01:54:37,859: Engine "crazy_test" playing white. 40 moves generated. Time left: 634.881 sec
2023-01-29 01:55:11,526: Socket error. CGOS connection lost.
2023-01-29 01:55:11,527: Disconnecting
2023-01-29 01:55:11,527: Attempting to connect to server '203.138.189.63', port 6819
2023-01-29 01:55:12,796: Connected
2023-01-29 01:55:13,602: CGOS Error:  You are already logged on!  Closing connection.
I think that the server should not refuse connection if I am already logged on: just disconnect the existing one.
zakki
Posts: 7
Joined: Fri Jan 13, 2023 5:22 pm

Re: Python version of CGOS by Zakki

Post by zakki »

Rémi Coulom wrote: Thu Jan 26, 2023 7:26 pm It is a bit strange, because in order to produce a plot, I have to go to the end of the game, and undo moves one by one. Otherwise, nothing is displayed.
Rémi Coulom wrote: Thu Jan 26, 2023 7:33 pm Another remark: do you plot the win rate of the most visited move? Instead of plotting the win_rate and score of a single move, it would seem better to provide the win_rate and score (and visit count) at the root.
Rémi Coulom wrote: Sun Jan 29, 2023 12:48 am I fixed my bug: I was sending a multi-line json. Only the closing "}" was sent as analysis. That may have been a source of problems on your side. It may be worth documenting that the json must be on a single line.
I have fixed these problems and Yamashita san has updated the server. We can now view games in progress from web.
Rémi Coulom wrote: Sun Jan 29, 2023 3:03 am I think that the server should not refuse connection if I am already logged on: just disconnect the existing one.
I intend to do so, but the current implementation may be wrong.
https://github.com/zakki/cgos/blob/8729 ... os.py#L893
Rémi Coulom wrote: Sun Jan 29, 2023 1:27 am After moving in the game history, the board becomes dirty:
I too am aware of this problem, but do not know how to solve it.
Perhaps I need to understand WGo more deeply.
Rémi Coulom
Posts: 219
Joined: Tue Feb 12, 2008 8:31 pm
Contact:

Re: Python version of CGOS by Zakki

Post by Rémi Coulom »

zakki wrote: Sun Jan 29, 2023 1:42 pm I intend to do so, but the current implementation may be wrong.
https://github.com/zakki/cgos/blob/8729 ... os.py#L893
I feel the best way is to check the password first, then kill the old connection if the password is OK. I guess sending on the server's socket might still work when the client socket has died already.
Hiroshi Yamashita
Posts: 27
Joined: Sat Oct 30, 2021 1:31 am

Re: Python version of CGOS by Zakki

Post by Hiroshi Yamashita »

zakki-san has fixed this login problem. I have restarted both servers.
A few years ago, I tried to fix this. But it was bit difficult because login-account and password come two lines...
BTW 9x9 is here. Port is 6809. Maybe browser cash clear is needed in some case.
http://203.138.189.63/cgos/9x9/standings.html
Rémi Coulom
Posts: 219
Joined: Tue Feb 12, 2008 8:31 pm
Contact:

Re: Python version of CGOS by Zakki

Post by Rémi Coulom »

Hiroshi Yamashita wrote: Tue Jan 31, 2023 2:30 am zakki-san has fixed this login problem. I have restarted both servers.
A few years ago, I tried to fix this. But it was bit difficult because login-account and password come two lines...
BTW 9x9 is here. Port is 6809. Maybe browser cash clear is needed in some case.
http://203.138.189.63/cgos/9x9/standings.html
Great. I will soon create a system to connect all my weak levels to CGOS and let them play continuously.
flok
Posts: 37
Joined: Sat Jan 02, 2016 9:04 pm
Contact:

Re: Python version of CGOS by Zakki

Post by flok »

Trying to run a local version to speed up development of my program ("bot"). Unfortunately it doesn't work, please see https://github.com/zakki/cgos/issues/15

[EDIT]: it now works!
https://www.vanheusden.com/

https://github.com/folkertvanheusden/
flok
Posts: 37
Joined: Sat Jan 02, 2016 9:04 pm
Contact:

Re: Python version of CGOS by Zakki

Post by flok »

@zaki: any idea why my program 'DellaBaduckf6497eb' on cgos 9x9 is not matched against stop-0.9? It played 209 games sofar and none of them were against stop.
https://www.vanheusden.com/

https://github.com/folkertvanheusden/
Hiroshi Yamashita
Posts: 27
Joined: Sat Oct 30, 2021 1:31 am

Re: Python version of CGOS by Zakki

Post by Hiroshi Yamashita »

> why my program 'DellaBaduckf6497eb' on cgos 9x9 is not matched against stop-0.9?

Sorry, it was due to server setting "reducing anchor vs anchor game".
I changed. Please re-login.
Post Reply