#51 · ypercube
13 Mar 2008
Interesting idea wccanard. I would like to see it working.
Public forum discussion.
13 Mar 2008
Interesting idea wccanard. I would like to see it working.
13 Mar 2008
Indeed, nice idea!
13 Mar 2008
RoRoRo will evolve slowly, but I have no idea how I'll implement any kind of looking ahead yet. Random probing is not ruled out, but I certainly don't want to slow him down by a factor of 10000.
First things first - get him to at least acknowledge there is such a thing as a long chain battle, and be aware of which player he is. He's remendously basic currently.
13 Mar 2008
What is Dabble's algorithm?
I thought that with Knox, what happened was that the guy who wrote it, wrote it and then let it play here and then thought about where its weak spots were and tried to make Knox better. I *think* that Knox knew something about chain-counting, and might even have known nim (didn't it occasionally compute nim-values??). On the other hand I *thought* that dabble just did a brute force alpha-beta search plus some sensible evaluation function.
13 Mar 2008
I'm pretty sure I had a conversation with Knox' developer, where he told me he basically wrote an email to JP Grossman (the guy who wrote dabble) and asked him for his code. Then he made a couple of adjustments, perhaps added a nimcalculator. But in the end I didn't really feel much difference in playing Knox or Dabble, to me they looked like the same strength.
For more info about dabble u can go here:
13 Mar 2008
I just played dabble for the first time in my life. I agree, it's not a pushover! I played instinctively and fast and won 3-2 but for a computer playing so quickly (I put it on 10 secs per move) I think that I would have predicted a 5-0 whitewash before the game. I wonder what evaluation function it was using.
Michael: the web page you point me to seems to indicate that dabble is doing nothing more than alpha-beta. On the other hand I certainly felt that dabble was playing quickly and intelligently---an order of magnitude above Eric or Phil's program.
13 Mar 2008
@Phil: I'd love to have RoRoRo play on Vying Games. The interface is actually pretty simple, but yes if you try to figure it out from the javascript... : (( On the production server the js is several files concatenated and mini-ized so that it'll load faster. And, yes, it contains tons of stuff that's unrelated to the actual interface with the server.
I've been planning on working on a simple bot interface, and it would be extra motivation to have RoRoRo as the target.
A few questions:
1. Would I be right to assume that RoRoRo can handle login and session cookies okay?
2. Moves are submitted by HTTP POST, I'd assume that too is not a problem?
3. Right now the positions are available as JSON, will RoRoRo have a problem parsing it? With very little effort I could provide the positions in YAML or some other format.
4. If parsing JSON is a problem, or mapping the server's representation of a position to RoRoRo's representation is a problem, I can also provide the sequence of moves. That way, you can have RoRoRo recreate the game by playing back the sequence. For dots and boxes, I label the dots 1 to 36, and represent the moves as strings like "1:2" (a line from dot 1 to dot 2).
I'll need to add something to get a list of game ids (unless you want to scrape them, but I think it'd be better to avoid scraping). I'll also have to add something to make accepting invites, joining tourneys, etc, easier for a bot.
Anyway, if you're interested I'll make this a priority. I don't think it'll take a lot of effort on my part to make the server bot friendly. : ))
13 Mar 2008
Eric - you're a dude!
RoRoRo can login and handle cookes quite happily, and POST submission of moves.
RoRoRo's 'interfacing' engine is 100% perl, so I can probably hack together 20 lines of perl to parse simple JSON (or even use the CPAN module!). So probably no need for (4).
It will be interesting to see how tied to LG's interface RoRoRo is.... Currently the board parsing and game-play engine are very loosely coupled together, so it should be very easy to bolt in a different board parser.
I'm up for it!
13 Mar 2008
Great! We should probably take this to email. I'll send you my address.
13 Mar 2008
Thanks for the link to Dabble, michael... I'll take a look at it. The page does say, "it knows about chains and double-crosses but nothing else" which is interesting assuming he means dabble understands the *chain rule*. When CapellaBot's search depth is a little higher than it is now it finds double crosses on it's own, but it has no understanding of the chain rule.
13 Mar 2008
No Eric---I bet it doesn't mean this. I bet it just means that dabble knows that "all moves which open a long chain are the same"---this greatly cuts down the search space, especially near the end of a game. In fact, my guess is that the best thing for a computer to know about chains (i.e. long chains) is (a) all moves which open them are equivalent, and (b) after a move which opens one, the only responses that one should consider are: (1) take the lot, or (2) take all but two and sacrifice the last 2. If you are just doing alpha-beta then you might also want to take into account the fact that if you're not losing on boxes when faced with that decision, then one choice is provably a win and the line is not worth analysing in detail unless you're actually faced with it in practice.
13 Mar 2008
PS Eric or Phil: the source code to dabble is freely available. Can either of you make any sense of what it's doing?
13 Mar 2008
You're probably right wcc. I haven't looked at dabble's code, yet. It's a windows project and I'm a linux guy, so I don't know how far I'll get with it...
13 Mar 2008
It's written in some kind of Microsoft version of C++, so I would imagine that if you can read C++ then modulo the graphics routines or whatever it shouldn't be too hard to understand, if it's well-documented...Note also that the knox guy ported it to SunOS and linux, if what michael said is true (i.e. that he lifted a lot of the code).
14 Mar 2008
a) I too am a linux guy; and
b) I want RoRoRo to be all my own work. It may take a long time, and it may never be particularly good, but I'd rather that than just port someone else's program.
Anyway, if dabble's available for MS Windows, then there's precisely no reason for incorporating it in a bot here (or at vying). If people want to play against dabble, then they should just play against dabble, and not waste time with a web server being a middle-man.
14 Mar 2008
I did download the code for dabble. I won't be able to use any of it because it's windows centric and, like Phil says, I don't want to spend my time porting someone else's code. However, I don't mind looking at whatever techniques it uses. That said, it's a lot of C++. Several times as many lines as CapellaBot, and I don't much care for C++ so I don't know how hard I'll actually look at it.
(which is not to say it's not a fine program, of course, because I have no idea)
14 Mar 2008
I notice a number of the D&B championship leagues are completing. Does anyone object to RoRoRo playing in the next championship? I reckon he's only batting at about 1550-1600 (he's having some success against 1500s currently), so won't interfere with anyone who takes the game deadly seriously. The more games he plays the easier it will be for me to isolate the weak spots that need attention most urgently.
14 Mar 2008
I suspect the championship won't finish for _ages_. It's the 3rd division that always drags on. ch14 won't start until the end of April. In ch12 none of the four 3rd div rounds had finished when all of the 1st, 2nd and 4th rounds had.
14 Mar 2008
Here's the rough state of play:
1.1 michael vs. everyone
2.2 hoeksmarp vs. 2 people - couple of moves left
3.1 miuek vs Henrik Sjøl - approaching SCB
3.3 Dom vs. Lynda - 2 moves left
3.4 Belen vs. 3 people
4.2 George vs. Denise - last move
4.3 ria vs. 4 people - all in LCB
4.4 asha vs 5 people - most approaching SCB or beyond
4.5 caesar007 vs missA
4.7 Moot Point, roborally, bloke 3-way.
The thing that amazes me is that most of those games are over. There's no choice, no decision, no nothing left apart from either automatic playing of the only sensible thing or, even quicker, a simple resign from one of the parties.
But it looks like divison 3 are the not the most likely division to finish last this time.
15 Mar 2008
Hoeksmarp had been moving regularly, but now hasn't been on in about a week.
I don't know why it seems to be standard in this game to not resign. I do, but so many do not. Perhaps it's because the game can't go that many moves. But in addition to speeding the game up, resignations preserve enough of the play on the bord so that one can look at a final position and remember how the game went. When you play until the board's full, you can't do that.
15 Mar 2008
The thing that Phil will learn, sadly, over the next 6 weeks is "it ain't over till it's over". Some of these games will plod on for weeks, I bet, even though anyone who knows how the game works could easily "adjudicate" them. It's just one of those things.
@Dvd: people don't resign because it's easy to make a slip in this game :-) I don't resign much; I just tend to play very quickly when I've analysed the game, which I've always felt is not that unreasonable.
15 Mar 2008
Is it really ethat easy to make a mistake when there is at most one box and all the boundaries of chains have been determineed, even if not completely filled in?
15 Mar 2008
In a game where the controlled value is negative (i.e. lots of loops) it's _definitely_ easy to make a mistake!
15 Mar 2008
By "box" I meant loop of 4. If there are zero or one loops, and the only loop if it exists is of minimum size, I don't think I'd make a mistake, and you're a whole lot better than I am.
15 Mar 2008
I absolutely agree that if the endgame is just a bunch of chains then it's hard to make a mistake. I just looked at the last 5 games I lost here, expecting to see loads of loops in all of them, but I didn't. In fact, I think that in practice my algorithm appears to be the following: if my opponent is sub-2000 I make them play it out, regardless of how easy it is, and if my opponent is someone like Scot or gej then I just resign the moment I know that we both know what's going on. I guess that to summarise, I seem to resign when I know that I'm sure that my opponent will win. Perhaps that's an entirely reasonable situation! On the other hand I have no objection to playing out easy wins against weak players who don't make a move for 10 days; that's their privilege. I usually play fast here but the other week I was so bogged down with work at work and childcare at home that I barely played a move for a week in any game, win or loss.
15 Apr 2008
Oh, RoRoRo plays D&B on Vying games too now, for reference.
And he's hopefully fairly immune from player-2's mirror strategy, but still pretty darn stupid.
15 Apr 2008
Thanks for bringing RoRoRo to Vying Games, Phil!
Do you have plans to extend RoRoRo to play other games there, too?
15 Apr 2008
Not currently. My main focus is on LG, as that's my personal playing environment of choice. However, if there are games on both servers, then I'll try to make sure he can play on both.
17 Apr 2008
That sounds good Phil. There are a few games in common between sites, Reversi/Othello, Dots, Amazons, Breakthrough, and Connect6. A few more will be added to that list eventually, but it's not my goal to "replace" little golem, so I doubt the full lineup will ever be at Vying Games.
17 Apr 2008
I thought a little more about AI. I am wondering whether significant speed-up of the usual algorithm for endgames (i.e. "brute force") can be obtained by spotting isomorphisms between small regions. Imagine an Icelandic 2x2 with the inner corner sacrificed, i.e., in plain English, an L-shaped region in a corner of the board (the corner box and the two boxes touching it).
<font face="courier"><br/><br/>+-+-+<br/>|x| <br/> +-+ +<br/>| <br/> + + +<br/> </font>
A sensible program would realise that the two corner moves are "the same" (because the corner moves are the same in any position) and only analyse one. But of course because of the global symmetry there is only one other move to analyse, and I bet most programs think there are two (and most of the rest think there are four). Furthermore, after this one other move the resulting position (an Icelandic 1x2) only has one move worth analysing (the free move) because this move dominates the sacrifice. So really the position above can be represented by a kind of tree: The L-shape, which leads to two positions: the Icelandic 1x2 and
<font face="courier"><br/><br/>+-+-+<br/>|x| <br/> +-+ +<br/>| <br/> + +-+<br/><br/> </font>
and the Icelandic 1x2 now leads straight to the 2-chain and then nothingness, and the above position leads to either a 2-chain or a 3-chain (again: there are "apparently" 3 or 5 moves depending on how clever your program is, but in reality there are only two). So all the complexities of the original position are really encapsulated by this tree---actually, one could even make the two 2-chains "the same", making it a directed graph. The directed graph (with certain labels on the edges indicating (a) whether the move is loony and (b) data about how many boxes the move sacrifices and, if it's loony, whether the resulting decision is an all-but-two or an all-but-four) completely encapsulates the original position in what looks to me like the most efficient way. Now you can forget about the original position completely and work with the graph of its followers. When analysing more complex positions one can spot moves which are isomorphic because their follower graphs will be isomorphic, and you'd only have to "analyse them once" as it were. I don't think any program I know about thinks about the game in this way. Would the added complexity of carrying trees around dominate the resulting simplification in the analysis of the game?
17 Apr 2008
In each pic, move the 3rd and 5th lines left by 1 space.