Thread: [Toss-devel] TOSS NLP
Status: Beta
Brought to you by:
lukaszkaiser
From: Patrick H. <pat...@ho...> - 2014-03-08 16:35:26
|
Dear TOSS devs! I'm impressed especially by the ideas related to the AI of this project, especially how it learns to play arbitrary board games. I'm interested in developing some sort of NLP interface (or some sort of NLP board game at the beginning ) for TOSS based on the learning techniques this AI uses for board games and contribute it to this project. I think that the learning technique TOSS uses could also be a breakthrough in natural language processing of simple sentences. I managed to compile TOSS on Tiny Core Linux, but how can I compile changed toss example files in such a way that the browser interface will be adapted to the new file, and the TOSS AI will have created tactics for my modified toss file such that I can test the AI. Is it described in the reference pdf? I will read it the next days. Another question: Is it possible to hide game knowledge from the AI? If not, no big deal, since I can model unknown knowledge by the "movements" of other players. And can you add me to the mailing list please? Best regards, Patrick Hammer |
From: Lukasz S. <luk...@gm...> - 2014-03-09 19:58:18
|
Hello Patrick, Thank you for your enthusiasm! You may have a look at our subsystem for richer language processing: http://toss.sourceforge.net/term.html Let us know if you like it. If you do, I will likely document it, and write a tutorial. If you start learning it, we can discuss the details on the mailing list. The learning aspect of game playing is not that well developed yet. We had plans to implement weight learning for "board" features but haven't got time to work on it. I leave the webclient and Toss server issues to the other email. Regards. |
From: Lukasz K. <luk...@gm...> - 2014-03-10 00:24:45
|
Hi Patrick. Let's start with the technical problems. > I managed to compile TOSS on Tiny Core Linux, but how can I compile changed > toss example files in such a way that the browser interface will be adapted > to the new file, and the TOSS AI will have created tactics for my modified > toss file such that I can test the AI. Is it described in the reference pdf? The first thing I do when creating a new .toss file is like this ./TossServer -f examples/Connect4.toss -play 1 where of course you replace "examples/Connect4.toss" with your file. This starts a computer-vs-computer self-play with 1s per move limit. There is no bash-interface for human-vs-computer playing. It would be very easy to do (we might get to it if you insist), but it'd probably be quite annoying: ascii display only goes so far, and typing an exact move rule each time gets annoying very fast. That's why we focused on a web interface. To start the web interface, you must have both TossServer and Client/JsHandler.js compiled - the standard "make" compiles them both, but make sure they're there. Then you just start the server ./TossServer -p 1234 and go in your browser to localhost:1234. That should (by default) show a local copy of tplay. Now - to get your game there, you must do a few things. The first thing to remember is that we designed the web stuff to work offline too - so all games are pre-compiled to javascript. In the Makefile, this is done by the rules that put TOSSEXFILES (examples/*.toss) into Resources ml, which then get compiled into javascript. No need to change anything there, just put your .toss file under examples/ and do "make clean; make" to re-compile. Then, you must go inside Client/JsHandler ml and look at the gSel_predef_games record - that's how game names are associated with toss files. So just add a line there for your file and your game name. And that's it for the basics: if you re-start the server and open localhost:1234/?game=YourGame, you should get a basic UI for your game. Now - making this UI really usable might require a bit more work, but I hope this can at least help you get started :). (If you see strange JS bugs in your browser, it might be because you are not using the right version of ocaml-to-javascript compiler. OPAM should give you the right one, but if you see problems, just let us know.) > I'm impressed especially by the ideas related to the AI of this project, > especially how it learns to play arbitrary board games. I'm interested in > developing some sort of NLP interface (or some sort of NLP board game at the > beginning ) for TOSS based on the learning techniques this AI uses for board > games and contribute it to this project. > I think that the learning technique TOSS uses could also be a breakthrough > in natural language processing of simple sentences. That sounds very interesting :). We tried a bit with our own NLP, as the other Lukasz already wrote you, it is all in Term. If I were to do that again now, I think I'd not try to do parsing myself but use an existing parser (probably zpar, see zpar on sourceforge), and work forward from the resulting constituency trees. But that's just my opinion, maybe the other Lukasz does not agree ;). > Another question: Is it possible to hide game knowledge from the AI? If not, > no big deal, since I can model unknown knowledge by the "movements" of other players. Do you mean hiding from the player in general, or just making the AI weaker? To make the AI stupid, you can just give it little time, it moves at random then. Full support for games with imperfect information was high on our list for some time, but I'm afraid it never got done. My best and keep in touch if you need any help! Lukasz Kaiser |
From: Lukasz S. <luk...@gm...> - 2014-03-10 13:13:44
|
On Mon, Mar 10, 2014 at 1:23 AM, Lukasz Kaiser <luk...@gm...>wrote: > > That sounds very interesting :). We tried a bit with our own NLP, as > the other Lukasz already wrote you, it is all in Term. If I were to do > that again now, I think I'd not try to do parsing myself but use an > existing parser (probably zpar, see zpar on sourceforge), and work > forward from the resulting constituency trees. But that's just my > opinion, maybe the other Lukasz does not agree ;). > I totally agree, as an approach to consuming unrestricted natural language. I held that opinion even before starting the work underlying http://toss.sourceforge.net/term.html (to tie loose ends of ideas we explored before). However, if you are thinking about doing a controlled English style game, with the vocabulary and grammar built from the ground up, it might still be a good framework and parser to try. If "Term" was better integrated with Toss as a whole, it would certainly be appealing in that spirit. But especially as it's not so tightly integrated, I do support starting from scratch on a subsystem that interfaces with the output of a broad-coverage grammar/parser. Cheers. |