Skip to content
Little GolemMake your next move.

New Dvonn bot

Public forum discussion.

Gipf projekt

#1 · FatPhil

27 Jul 2007

I've put a very very very rudimentary

Dvonn bot in the waiting room. Currently it only understands the rules for making moves, but nothing much else. I'll start adding more intelligence in the coming days, but thought that some of the novices might be able to have fun trying to beat it. It plays almost instantly, so they can play practically in real time. It never turns down an offer of a game, and is awake 24 hours a day.

#2 · FatPhil

30 Jul 2007

Hmmm, what's the largest number of options for a move? It looks like 60+ is not uncommon.

#3 · XanderN

30 Jul 2007

I don't think you will ever have more than 60 movement options at any situation in a normal game. The largest number will probably be 49 (i.e. when you get to placed the first red stone). However, if you would consider theoretically the largest number possible (for programming purposes), with a really strange and uneven setup, you could have 20 stones on the edge with 40 directions of movement possible and 3 more stones which can go 3 ways (i.e. 89 total). Since after the first move you will have towers of 2 high, 1 position from the edge, the number of directions in which they can go will still be only 4. I therefore think 89 will be the upper limit.

#4 · Paavo Pirinen

31 Jul 2007

Whoop! More dvonn riddles. *digging a dvonn board* This is just a late night quickie, but I can create a legal situation with 108 possible moves :) More should be possible.

#5 · FatPhil

31 Jul 2007

108's surprisingly high. I'm pretty sure an average of 5 per piece (115) will be unreachable, but it is possible to have 6 moves for a single piece, so some surprisingly high values might be attainable. How many 6-move pieces does your configuration have?

Anyway, progress on putting some AI into the bot (rather than just knowning what a legal move is and playing the first one it finds, which was what the initial live bot did) is taking more effort than I thought. I've started making some progress towards having it evaluate a board position, and it compares the outcome of each move using that metric in order to chose the best. Absolutely no lookahead yet though, and it doesn't understand what happens when pieces are separated from the dvonns either, so still pretty darn stupid. I'll look at the latter today hopefully.

#6 · FatPhil

31 Jul 2007

What's the general view regarding signing up bots for rated tournaments amongst Dvonners? In GWG he's very shy currently, but in EinStein, he's up for anything and everything. I can configure him to be either extreme, and all shades of grey in between.

#7 · mongoose

3 Aug 2007

I think we all are interested in seeing how strong a bot is and the most convenient way to see its strength is allowing it to play rated games. Since 4-player rating tourneys are intended to match opponents of similar strength, it seems the bot would not only be useful in such events but would also exhibit its progress more accurately.

However, I am of the opinion that monthly cups and championships should be reserved for humans.

#8 · mongoose

3 Aug 2007

I did enjoy the speedy results of playing against your bot. We have almost finished but it doesn't seem to know how to pass. It appears you've given it a good foundation to build on. I am eager to see it improve in the coming months.

#9 · FatPhil

3 Aug 2007

There was a minor little bug - it was sure that it could play a move!

In theory, I added a short-circuit such that if the 'pass' link existed, it would stop parsing the page, and just pass immediately. However, I wanted to print the grid to the screen, so I removed that short-circuit so I could parse the rest of the page, and everything just fell to pieces. I've fixed that and about a dozen other little bugs this morning after seeing the COMPLETE thrown-up-all-over-itself shat-its-pants state that it had gotten itself into overnight.

Lesson 2 - placing pieces is *HARD*.

#10 · FatPhil

3 Aug 2007

I forgot to mention that I've set the bot to display 'polite' tournament behaviour - it will sign up for RTs, but will only sign up for MCs if it is the first to do so. That way those who don't want to play against bots can quite happily sign up when RoRoRo's not enrolled, and he won't join after them. I've already seen it turn down the opportunity to join another MC.

It only checks tournament states when a game of the same type has finished, which means that it will often miss its opportunities to sign up to MCs. It's also limited in the number of games and tournaments it can be playing in simultaniously, so will often not check at all.

If it seems to be out of control, just message me and I'll see what needs to be fixed.

#11 · Jan C. de Graaf

3 Aug 2007

My Dvonn program (Jan's program on Little Golem) had a pretty decent A.I., the most extreme position I witnessed had 93 legal moves. A few moves after the setup phase 60-70 possible moves is quite common. When programming lookahead into your bot you'll find out that implementing cutoff's correctly AND efficiently is quite hard to do. My program never had a automated interface, otherwise I would have let it run 24/7 on LG. It used to play in every type of LG tournament. This was accepted by nearly all players probably because it listed itself as being a program.

#12 · FatPhil

4 Aug 2007

Pruning will be the next priority once I'm happy that the basic code is correct. I saw it make some completely stupid moves yesterday, so I think there are some serious bugs.

#13 · FatPhil

4 Aug 2007

OK, lots of bugs found this evening. I _think_ that its not completely stupid now. Everything bad that happens now is hopefully due to incompetent design rather than incompetent implementation!

The placing of pieces in MCs is still utterly $&*@. I'll focus more on the RT play before I look at placement. There are plenty of things that need to be improved in order to be even be vaguely competent.

#14 · FatPhil

5 Aug 2007

Another Dvonn puzzle! Create a game-ending position with the largest number of singletons still alive. I'd not be surprised if more than 7 was possible, but don't remember any games that I've played that have even had 1. RoRoRo managed to contrive 2 just now in Game 749460.

#15 · XanderN

6 Aug 2007

7 is indeed possible. I tried to find a solution with 8 or more, but have been unsuccessfull so far.

#16 · FatPhil

10 Aug 2007

What's the highest pile that's appeared in a serious game between non-novices?

I'd like to cram my heights into a 5-bit field, and wonder if 32 or above is ever likely to be encountered.

#17 · XanderN

12 Aug 2007

I am pretty sure on BSW I have obtained piles of 32 or higher, but this admittedly was against opponents which were not as good as I. BSW gets a bit buggy with that high stack btw, it starts to mix the colors in that high stack, you could see 5 reds in the game for example ;-) (maybe it is fixed now) Also with the 3-d view of the board placing stones on top is difficult (since the top of the large pile could be on the at the same location as another stone/stack).

Maybe as a workaround for your program for the stonecount: if there is a stack of 25 or more, the height is irrelevant, you can just make it 25 - whoever owns that stack wins. (That is an extra line of code, but one bit less for the fields).

#18 · FatPhil

12 Aug 2007

I'll not fret too much, as the bot is programmed to aim more for mobility than anything else, so it will almost certainly never see such a pile. If something gets too large, it'll probably aim to split it away from a dvonn anyway. So I think 32 is not a limit I need to worry about.

It's not a disaster anyway, my current bot will cope with 8-bit values. It's just that it was getting a bit bogged down on 64-bit bitmasks (it's just a poor P3), so I thought that I could move the bits into the top of the height fields, so there would be no need for any more 64-bit operations. If it's not faster, I shall probably just run with my current code. (But I'm expecting it to be measurably faster - when it b****dy works.)

I just had a truly wacked out idea. Doubledvonn - 17 stones across the top, 9 rows high, and 9 dvonns. Awesome! Yes, I should pdtcp.

#19 · XanderN

13 Aug 2007

The nice thing about Dvonn is the speed at which it can be played, that would be lost with a bigger board, although it would be nice to try and see if anything is going to change with a larger board though. Talking about playing fast, did you ever try playing a Dvonn game with a 1 minute timer per player for the entire game (including set-up phase). It is really quite challenging to play like that. (It only works Brettspielwelt, with a real board, you cant place/play stones in that fast).

#20 · FatPhil

14 Aug 2007

Oh, I fully agree that speed is a very positive trait. I play quite quickly except in the end-game anyway so would probably enjoy it a lot.

I wouldn't expect doubledvonn to have the same feel at all.

And as this is the bot's thread, I think I've stamped out the final bugs in the bot, and also made him a little faster in the process. It would be nice for him to play more rated games so that he can find his place in the ratings. Currently, I just don't know how good he is at all. (Losses to a 14xx and a win over an 18xx, so it's a bit hard to tell currently!)

#21 · XanderN

15 Aug 2007

I don't mind playing your bot at all, but I do prefer to play it in a monthly cup rather than in rating tournaments, since I do want to place the stones myself. A bot is flawless in the endgame, but vulnerable in the early phase of the game, since then the intuition (or foresight what the effect of stone placement or play will be towards the end of the game) is more important then. Playing a complete game rather than only the second part should therefore better balance my weakness against the bots weakness.

For this reason I think it is therefore unfortunate that we start the unrated games also with a random setting.

#22 · FatPhil

15 Aug 2007

Currently RoRoRo thinks its got too many tournaments active, so isn't signing up for any new tournaments. Maybe I should increase that parametrisation, so that he gets another MC in some time soon.

His placement is certainly better now than it was a week ago, but it is still the weakest part of his game. Playing in so few MCs means that I get almost no opportunities to correct weaknesses in that part. I agree that it would be nice to be able to specify if unrated games are to be random placement or not.

His endgame is certainly pretty good, as you correctly predict. There are a few constructs that confuse him, but I think he plays >1900 at that stage of the game. In theory I could crank up the parametrisation a bit, and he'd have more look-ahead, but I want him to take no more than about a second per move on average. It would take immensely more crunching earlier on to get an extra 2 plies, so yes, he'll always be pretty unexceptional at the start.

#23 · XanderN

15 Aug 2007

Have you had RoRoRo already play against Jan's program ? I am curious about how it will do.

#24 · FatPhil

16 Aug 2007

I'd love to have him play Jan's program. I don't think he'd do very well as it sounds like Jan has a pretty smart AI design, and mine's basically rather dumb. I can crank up the parametrisation for such a match, to give it a bit more of a chance. How long does Jan's Program take per move?

Currently for RoRoRo:

GWG moves take between 3s and 500s, average ~20s (500 when there are stars nearby).

EinStein moves take between 0s and 15s, average 1-2s

Dvonn moves take between 0s and 4s, average

As you can see, I've kept RoRoRo's parametrisation quite modest for Dvonn.

#25 · XanderN

17 Aug 2007

I only have an old version of Jan's program, which is slower and not as good as the version that Jan played here. It took per move as long as you would wait (it would calculate indefinately). On my old pc (a 2.g GHz P4) it took about 10 seconds until the best move would be found and calculating for longer would not make much difference. In mid-play it would take up to 60 s.

#26 · XanderN

17 Aug 2007

As far as I know you can still download the old version btw (In the old thread Jan gives a link), so you can try yourself.

#27 · FatPhil

17 Aug 2007

OK, 10s on a P4/2G is about 40s on my P3/700, and 60s corresponds to about 100x the time RoRoRo currently takes. That means I could ramp up the parametrisation by twoor three notches to keep things about level time-wise.

However, I won't be able to try for myself, as I have no machines that run MS Windows, and no interest in sticking any Microsoft .NET architecture on any of my linux machines, thank you!

#28 · ypercube

17 Aug 2007

You can try a W*****s emulator or virtual machine loaded on your Linux machine though.

#29 · FatPhil

12 Sep 2007

As I mentioned before, I currently have RoRoRo configured to not spend much time looking for the best move. He's quite easily beatable by all of the top players on the site. I'd like to be able to have him play a full game (so not unrated or RT) at a higher parametrisation against some of these better players (at least one has expressed an interest in doing this). However, I don't see how to do this "fairly".

If I crank up the parametrisation for just one game in the MC tourney, then that's not fair on that single player, as the other players get an easier opponent. If I crank it up for all matches in the tourney, that's not fair for those 4 people relative to those who play in the other MC tourneys.

Perhaps the best thing to do would be to find 4 volunteers who would like to play RoRoRo on steroids, and all contrive to sign up for a single MC simultaneously, knowing that that's the one with the tougher bot.

Thoughts? Would I get 4 volunteers? (I only need 3, I don't mind suiciding myself in the 5th slot. Hmmm, I could also create a second robot and have him run at the original parametrisation....)

#30 · ypercube

12 Sep 2007

count me in! i'm your guinea pig :)

#31 · XanderN

12 Sep 2007

I will sign up :-)

Maybe you should ask Jan De Graaf to sign up his program as well, that would be really nice :-)

#33 · Jan C. de Graaf

13 Sep 2007

Sure, what maximum move time is my program allowed to use? At least 60s, otherwise it makes no sense playing against the better humans. Note that my program is not automated so it'll do at most a few moves a day.

#34 · XanderN

13 Sep 2007

A competition in which the dDvonn program also plays would also be nice (downloadable at: http://www.nivozero.com/DVONN/index.html) This program plays pretty good too.

@FatPhil: how do you propose we start this thing ? We somehow need to sign up all at the same time. (if there are others waiting already, we just fill up the remaining spots). I guess we will just need to pick a date/time. Monday at 12 CET ? (just a suggestion)

#35 · FatPhil

14 Sep 2007

OK, volunteers so far:

RoRoRo the bot<br/>Jan's Program (2200+ before it dropped out of .ch matches)<br/>Ngqobongwana  (2202) (if I interpret an in-game message correctly)<br/>Xander        (2039)<br/>Paavo         (1997)<br/>FatPhil       (1799)<br/>Ypercube      (1729)

You're right, Xander, coordinating it will be a little tricky. Fortunately we're all separated by only one time zone, by the looks of things, so hopefully we can all be checking for the time to sign up roughly together. I'll sign RoRoRo up as the first entrant of a MC as soon after 12 CET Monday as possible. If there are only members of the above list already signed up, it'll also sign up. Hopefully we can all sign up before an innocent party gets involved.

@Jan - given the strength of your program, I don't think there's any need for you to crank it up beyond what it usually played at. In a recent test against Nqgobongwana, it took 1000 as long (15m) as my usual setting (1s) for my program to decide to not make a bad move, so I'll probably be running at that level. Of course, P3/700 seconds aren't actually that much computation compared with those of modern PCs.

I think that my 'targets' for this experiment are Xander and Paavo. I suspect that the top two are OOTW, and I know that I'm not really a match for it even at its current level.

#36 · FatPhil

14 Sep 2007

Actually, I'm not in a rush at all, this can be done in a couple of weeks time, no problem. I've just noticed RoRoRo slot in a couple of unexpected victories (against >1900s), which has meant that he's possibly not reached steady-state in the rantings yet. It makes more sense to let him reach steady state with his current parametrisation, so that I've got a better idea of whether victories at a higher parametrisation are to be significant.

#37 · FatPhil

15 Sep 2007

I've also just noticed a catastrophic failure mode when placing pieces. If there are two very similarly valued areas, such as a symmetric pattern (dvonns in a big 'V'), and you keep picking the cells that the bot most wants, then it will almost always pick from the other size of the playing area. There will be no mixing of pieces, and it all ends up a complete nightmare. I wish I'd spotted this mess earlier, I just hope that he can get a few more full practice games in soon. (Oh, if only you could chose the invitation games to be full games...)

#38 · XanderN

15 Sep 2007

That mess is not so bad ? With respect to symmetric set-ups, they are just a lot of fun, I played a lot of those games with weird symmetric placements.

#39 · XanderN

15 Sep 2007

for example: games 505729 and 435549. I think there must be at least 10 more games like this I played here at LittleGolem.

#40 · FatPhil

15 Sep 2007

505729 is utterly absurd! OK, I'll see what the bot makes of 767166 then. I'm sure it won't be pretty. I know that

Won't pure symmetry always favour one player? (Namely the player with the opportunity to break it when it no longer favours him.)

#41 · XanderN

15 Sep 2007

A pure symmetric setup favors white I think (I lost both games I found, and I played black, I should try to find the others to see how I did in those - I played black in all of them, I dont create symmetric set-ups myself). If white does not make mistakes, black can never find a better move than white.

#42 · FatPhil

16 Sep 2007

Ngqobongwana (2200+) just narrowly beat RoRoRo at ~6 minutes per move, roughly equivalent to Jan's Program's 60s on a modern machine. RoRoRo clawed his way to a slight advantage, and then threw the game away with a silly move near the end (even I could spot what the correct move was). He was confused by the huge mass of black pieces, which prevented him from analysing the important parts of the board in enough depth. I've probably fixed the placement problem, so should be able to put up a better fight tomorrow. I notice that there are 3 people in the current MC. There's no rush to start that tourney, I can always join tomorrow if need be, and I think I may have persuaded my girlfriend to join too if need be, so midday looks like it's still on for a RoRoRo-on-steroids battle.

#44 · XanderN

17 Sep 2007

It seems like more players are volunteering (maybe without realizing) to play RoRoRo extreme ;-)

#45 · FatPhil

17 Sep 2007

It's alright, Schaapmans knows what he's in for!

The name change is only temporary, to warn people off signing up, obviously. He'll be back to his silly original name immediately the MC starts. I do not expect to repeat this experiment very often at all, I just want to know whether the bot is actually aiming in the right direction.

#46 · Paavo Pirinen

17 Sep 2007

A bit late, but still I'm in now. Must try to play my best :)

#47 · FatPhil

17 Sep 2007

Great to have you on board, Paavo! As I nearly beat it at level 7 yesterday, I'm up for taking the last place, but I'd rather some brave chappy who's actually good did instead! Another of the top 10 players or Jan's Program would be perfect.

#49 · Jan's program (W:297,L:86,D:6)

19 Sep 2007

I will wait at the end of the setup fase until we agreed upon a time-per-move ,and untill RoRoRo has been configured accordingly.

#50 · FatPhil

20 Sep 2007

If you do an average of 60s of a 2GHz P4, then I'll do an average of 5 mins of a 700MHz P3?

However, the conclusion alas seems to be that RoRoRo has flawed logic, and that no amount of CPU power will save it.

Last page