Comments (4)
Hi Jin, I'm glad to hear you liked my package! :)
As mentioned in the thread you linked, the GTP command you are looking for is loadsgf
. However, I think that implementing this will be a little bit tricky because of the controller/responder nature of GTP and limitations in the current sente implementation of GTP.
In general, there are two kinds of programs in GTP:
Responders:
Responders are programs that respond to stimuli from another program. Most AIs are responders and only do anything when they are asked. Sente's gtp.Session
object is a Responder.
Controllers:
Controllers are the programs that issue commands to responders. They are responsible for enforcing rules and forwarding instructions between multiple responders.
You can see a list of typical use cases in the GTP documentation. Sabaki uses the second case, where the GUI is the controller and the engine is a responder. The loadsgf
command you wish to use is, like most commands issued by a controller to a responder. Therefore, what you want to implement is a controller with two responders: One responder being your AI and the other responder being Sabaki.
There are two problems with doing this. The first is kinda embarrassing for me, sente does not currently have a Controller class implemented (there are files for it but they are empty 🤦). This means that until I can implement the controller, you are on your own for implementing a GTP controller. I don't think implementing a special case controller is too difficult to do in python, you really only need to forward stone placements between the two responders and also call loadsgf
. Sente will probably implement a GTP controller class in the next major update. If you choose to do this I recommend running a GTP session in a terminal with a sente session as seen in the docs. That will help you get to know the basic syntax and response structure.
The second problem is that I am unaware of any way for Sabaki to behave as a responder rather than a controller. I wouldn't be surprised if Sabaki does have such functionality, but most people who use GTP in Sabaki are trying to get Sabaki to play an engine so I wouldn't be surprised if it's buried deep somewhere. I would check the Sabaki Command line arguments.
As you can see, getting this to work with GUIs can be quite tedious. If it's absolutely necessary for your AI by all means continue, but I would reconsider how beneficial it is to get these GUIs working. Please let me know what you end up doing
from sente.
Hi @atw1020,
Thanks for your timely response. I did not expect the difficulties, and it's certainly helpful to learn them in advanced. Let me clarify what my goal here is, and please let me know if there are some other workarounds.
I want a better way to take notes about go. So far, most people use comments in sgf
. While that's fine, it's very far from being programmable. What I have in mind is to be able to take notes in org-mode (a stronger version of markdown). You can imagine adding links like sgf://~/game.sgf::[node-id]
to markdown, which serves as a link that brings us to the specified node displayed in a GUI. This way, many people can easily create notes for several sgf files all at once. For example, I can create a text file for josekis following a certain movement.
What's blocking me from achieving my goal is a programmable way to jump to a specific node and make it displayed in a GUI. That is what motivated me. Perhaps you happen to know some other software that's helpful for this? I'm excited to hear more from you. Thanks again!
from sente.
So to make sure I'm understanding you correctly, you want to have a user click a link in this "org-mode" and have it open an SGF file to a specific move?
from sente.
Yes!
from sente.
Related Issues (10)
- generated sgf File did not perfectly match SGF format HOT 4
- sgf replay can't get game.get_winner() HOT 4
- game.get_sequence() result like on sgf file HOT 7
- game.get_results() like on sgf file HOT 4
- board display option HOT 2
- an example code how to make it a game human vs comp or human vs human HOT 2
- [sgf.load] How to handle games with handicap HOT 5
- pip installation not working in sente 0.4.3
- No such file or directory: 'version.txt' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sente.