The State Of Play Tafl Online

Tuireann
Posts: 30
Joined: Fri Mar 04, 2016 8:44 pm

The State Of Play Tafl Online

Post by Tuireann » Mon Dec 31, 2018 10:51 pm

On whats going on with PTO:

The PTO server crashed, I did manage to recover the database(which had apparently not been backing up automatically due to the reason the server crashed); However it happens to be in it's binary format thus a little work must be done to it for it to be usable again. The inherant complexity of PTO also adds time to a redeployment. Any emails should have bounced back lest they will have become one with the void as the PTO server also hosted the PTO email. Recently at my work our CEO passed away after running the company for 30+ years and the new CEO has been making a lot of big changes before the end of the year which has been time consuming to say the least. Fortunately that year just ended and so I plan on finishing the redeployment this weekend with the best case scenario being that it will be running by next week. So far the biggest issue with the original crash has been resolved(faulty snapshot setup which led to filesystem corruption; oh the irony) and the data has been moved to the new system. Any running games will probably be set to declined by time out as not to affect anyone's ELO. Sorry for the inconveniance but unfortunately my day job has to take priority in my life and with 6-7 day work weeks with 12+ hour days I haven't had the time or will to even work on getting PTO setup again.

On AI Mirror Games:

I saw some questions about what would stop someone from running a mirror game with one of the AIs that were part of PTO. Not to talk down the efforts of Fishbreath and myself but the resident PTO AI, Monty(written by me), used Monte Carlo simulation(A very very basic version of what AlphaGo uses to train itself) and it's unsuitable for Tafl because the game of Go is almost always moving towards it's end game as pieces are rarely removed from the board and that made it ineffective for a game like Tafl where judging the value of board positions is extremely difficult. OpenTafl(written by Fishbreath) on the other hand I would characterize as taking a more Chess-like approach and it was light-years more advanced than the Monty AI. It would attempt to brute-force a large number of possible moves and evaluate the value of each position based on where the pieces would likely be 5-7 moves ahead. Even given 30 seconds per move on PTO it would struggle with anything larger than a 9x9 board; In fact for Copenhagen it would only make it 4-5 moves deep at best and it would consume 2+GB of memory in the process which would increase exponentially the deeper it got. For it, in its current state and in my own personal opinion, to be useful in winning against a 1700+ rated player you would effectively need a computer with at least 1TB(1024GB) of memory(I work with 'super-computers' at my day job and our most powerful single node has only 512GB). The lack of an ability to computationally evalutate a board position mixed with the complexity of a game like Tafl makes it unlikely an AI will defeat a competent human at it any time soon.

Happy New Year,
Tuireann

Steiger
Posts: 14
Joined: Sun Dec 09, 2018 11:59 am

Re: The State Of Play Tafl Online

Post by Steiger » Tue Jan 01, 2019 7:07 pm

Thanks for information, Tuireann!

nath
Posts: 65
Joined: Mon Oct 09, 2017 9:34 pm

Re: The State Of Play Tafl Online

Post by nath » Mon Jan 14, 2019 7:39 am

Well, while the complexity of Hnefatafl is bigger than the complexity of chess, your comparison isn't fair. We don't have the same amount of preordering and razoring a modern chess engine has. No modern chess engine could calculate anything interesting without cutting (more than 80 % of the variants)...stockfish is way better at this.

I as a human razor a lot. The interesting part is, that we should be able to do a decent preordering on the moves, just based on the move (and moving piece) itself. I mean things like outer rows are probably important as well as king moves are almost always interesting.

OpenTafl is basically trying the impossible: uniting radically different board games with one engine. I'm not only talking about the different kings setting, but also about the size. Some of the constants aren't relevant for a lot of variants. The eval also seems to be mainly tested on boars with sizes of 9x9 and smaller.

While one can get 2 TB RAM machines with standard parts these days, I never had one of those in my hands. If one would want to archive something like that, the hardware limit these days would be NVMe SSD configured as swap space (one can easily get 8 TB that way), but as I wrote above the solution isn't bare metal, it's intelligent cutting.
My take on this: Just because I failed on my own four years back, doesn't mean it's impossible...and I'm talking about the average desktop today.
What I am confident about, is that the computer can give us new perspectives about the game, even when they still loose to top players.

Happy new year!
nath

unhandyandy
Posts: 39
Joined: Fri Dec 28, 2018 6:39 pm

Re: The State Of Play Tafl Online

Post by unhandyandy » Sat Jan 19, 2019 9:17 pm

I would think that Tafl might be easier to razor than chess, because in the chess the tactics are so sharp a game can seem to completely turn around with one bad (or brilliant) move; that seems to be less the case in tafl (but I'm a beginner).

For example, an important metric in tafl is how many moves away the king is from his goal. That should be relatively easy to measure.

nath
Posts: 65
Joined: Mon Oct 09, 2017 9:34 pm

Re: The State Of Play Tafl Online

Post by nath » Sun Jan 20, 2019 8:24 pm

Hnefatafl (unless you choose something like a 13x13 variant) is much more aggressive than chess. A quiet move in tafl is usually deadly (unless the game was more or less decided already).

While in Copenhagen Hnefatafl the distance (in moves) of the king to the corner is more a measurement for the game progression, than a reasonable part of an eval func. The point is that attacks against single corners can in most positions be defended by black. Just when multiple corners are attacked black gets a difficult job. Just taking the shortest distance doesn't tell much about a position. I think that the common pattern of the guillotine is roughly as important as the direct king escapes.

Most world class engines for classical games like chess, xianqui or shogi work with multiple move gen functions right now (basically all besides some doing new rf-learning stuff). Some that generate more or less important moves. Things like checks or capture are usually more pressing some seemingly quiet moves, and are investigated deeper.

The capture heuristic probably isn't a sensitive thing to do regarding Hnefatafl. But I suspect that one could assign a decent choice of ordering to the set of all moves (there just about 7 k possible moves, even if we include the moving piece). That is not only less than the set of possible moves in chess, but it also carries more information, because the target for the white player is stationary and doesn't move around like the black king does in chess.
The almost obvious point to this simple heuristic is that it's far from perfect, because the choice of the perfect target doesn't only (surprise, surprise) depend on the white king position, but on a lot of different factors on the board. I thus far failed to really cope with that fact.

unhandyandy
Posts: 39
Joined: Fri Dec 28, 2018 6:39 pm

Re: The State Of Play Tafl Online

Post by unhandyandy » Sun Jan 27, 2019 9:33 pm

A quiet move in tafl is usually deadly
Isn't it normal for Black to make quiet surrounding moves?
The point is that attacks against single corners can in most positions be defended by black. Just when multiple corners are attacked black gets a difficult job. Just taking the shortest distance doesn't tell much about a position.
So if e.g. white has multiple distinct routes to victory in three moves, that could count as a route in two moves.
I think that the common pattern of the guillotine
What's that? :shock:

nath
Posts: 65
Joined: Mon Oct 09, 2017 9:34 pm

Re: The State Of Play Tafl Online

Post by nath » Tue Jan 29, 2019 2:11 am

unhandyandy wrote:
Sun Jan 27, 2019 9:33 pm
A quiet move in tafl is usually deadly
Isn't it normal for Black to make quiet surrounding moves?
When the game is basically already decided, black makes calm moves, because he has nothing to gain my aggressive moves. That only happens, when the white escape is already securely blocked. The critical part of the game is highly aggressive. Top players showed that the aggressive part doesn't need to end after 15 full moves, but can hold for a long period of time.
unhandyandy wrote:
Sun Jan 27, 2019 9:33 pm
The point is that attacks against single corners can in most positions be defended by black. Just when multiple corners are attacked black gets a difficult job. Just taking the shortest distance doesn't tell much about a position.
So if e.g. white has multiple distinct routes to victory in three moves, that could count as a route in two moves.
I don't think I want to engage in the philosophical question here, but it's all about connecting these variants. Creating chances to attack multiple corners at once. Sometimes the best way to create an opening to attack a single corner is to attack a single one, to put some pressure there to make a multi-corner attack later. The strongest variants appear furthermore rarely forced, what makes the game even more interesting. Schachus understood that on a much more natural level than I ever did.
unhandyandy wrote:
Sun Jan 27, 2019 9:33 pm
I think that the common pattern of the guillotine
What's that? :shock:
You can read about that here:
viewtopic.php?f=3&t=23#p77
I don't know who invented it, but it's really basic and around far longer than me.

unhandyandy
Posts: 39
Joined: Fri Dec 28, 2018 6:39 pm

Re: The State Of Play Tafl Online

Post by unhandyandy » Tue Jan 29, 2019 8:54 pm

When the game is basically already decided, black makes calm moves, because he has nothing to gain my aggressive moves. That only happens, when the white escape is already securely blocked. The critical part of the game is highly aggressive. Top players showed that the aggressive part doesn't need to end after 15 full moves, but can hold for a long period of time.
Is there a standard format for recording tafl games? Is there an app for editing lines and annotations? Like pgn editors for chess?

Is there a game database? Somewhere one can play through instructive games?
So if e.g. white has multiple distinct routes to victory in three moves, that could count as a route in two moves.
I don't think I want to engage in the philosophical question here, but it's all about connecting these variants.
I wasn't being philosophical, that's what I did in my eval function. :)

nath
Posts: 65
Joined: Mon Oct 09, 2017 9:34 pm

Re: The State Of Play Tafl Online

Post by nath » Wed Jan 30, 2019 6:17 pm

unhandyandy wrote:
Tue Jan 29, 2019 8:54 pm
Is there a standard format for recording tafl games? Is there an app for editing lines and annotations? Like pgn editors for chess?
I don't know of any editors. We have the long notation of [a-k]\d{1,2}-[a-k]\d{1,2}x{0,9} where the x is purely optional and isn't necessarily part of the notation at all. Somehow it become standard to use the left column for white and the right one for black (I have no idea why), but I think it should be honored by now since it's de facto standard. So a game in this notation may start like this
1. h1-h3 2. e7-b7 a5-c5 3. ...
This site uses a slight variation where instead of the captured moves note the target square instead of the x, so a move may look like k8-j8-j7 (instead of k8-j8 or k8-j8x). Since they are basically all the same they are easy to parse if you have one of them.

We also have a short notation that basically just notes the target square So the above games looks like this
1. h3 2. b7 c5 3. ...
a different game might look like
1. h3 2. g3 gg2 3. ...
This is the format I use when I need to write things by hand or in my head. Regarding databases this seems to be the far less common format.
unhandyandy wrote:
Tue Jan 29, 2019 8:54 pm
Is there a game database? Somewhere one can play through instructive games?
There is a database here. I don't there is really a list of instructive games, since the community doesn't have a canon of how to talk about true strategies, since we basically don't talk about strategies. I had some discussions with casshern and Plantagenet, but I didn't have much talks about this stuff since Schachus left. I feel like the good ideas casshern brings to the table aren't valued since so few people understand them. I'm way to out of shape to bring them out (I usually just loose by stupid mistakes), but some of his moves are quite interesting. Such things can only manifest if some people talk out them. Honestly I'm not sure how to change that. One thing I always pushed for was to have a challenger and a title defender for the world championship. That way we could have like 4 games or so of top level play with one not participating player commenting on it. I think that would be very interesting and if there are comments that would be a great opportunity for other players to learn. I have no idea whether that would work, but what we are doing right certainly does not. I haven't played tafl for over a year and stopped playing seriously 4 years back, yet I'm confident regarding email play I could still compete (unless I have an opponent like casshern). I don't want to win, I want to be part of a community that shares knowledge as well as brilliant moves.

Sorry, I got off track. We have the games archive here. If you enter a strong GM (I currently suggest casshern or Plantagenet) for the one color and another (arbitrary GM, if it doesn't yield enough results try other ok-ish players like OdinHimself or mmagari) at the other side, you usually get a game that is instructional and does show you something about the game. However there is at least a set of basic knowledge that is helpful to comprehend what is going on. Patterns like the Guillotine the classical 3-4er defensive diagonals, the 4er/9er forts, or some basic tactical implications of having a king or pawn of either color on the 2nd or 3rd row are helping with that. Be aware that this advice applies to Copenhagen Hnefatafl. Some of the pattern changes if you want to learn Sea Battle tafl or even Brandubh. The method I suggest stays roughly the same, the concrete patterns and players change. A player that is competitive is quite often still competitive, yet be aware that it might be different for different variants. I like Copenhagen, since it appears to be the most interesting variant we have tried so far.
unhandyandy wrote:
Tue Jan 29, 2019 8:54 pm
I wasn't being philosophical, that's what I did in my eval function. :)
Sounds dangerous to me, since there might be moves blocking both routes at once. But for something as simple as Brandubh it might even work in some cases. Do you test your engine in self-play under time constraints?

All the best
nath

unhandyandy
Posts: 39
Joined: Fri Dec 28, 2018 6:39 pm

Re: The State Of Play Tafl Online

Post by unhandyandy » Fri Feb 01, 2019 5:24 pm

There is a database here.
Oops, I missed that - should be very useful. Is the code by Hagbard? Is it open source?
I wasn't being philosophical, that's what I did in my eval function. :)
Sounds dangerous to me, since there might be moves blocking both routes at once. But for something as simple as Brandubh it might even work in some cases. Do you test your engine in self-play under time constraints?
True, but I also check that the first moves in the routes are in different directions, so that reduces the danger.

Of course I've playing my engine continuously over the past couple weeks. I'm a beginner, so the fact that I can beat it doesn't look good. Have you tried playing it? Just open index.html in a browser.

Post Reply