Timeline for A game of dice, but avoid number 6
Current License: CC BY-SA 4.0
21 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 9, 2019 at 23:00 | comment | added | Christian Sievers |
@maxb Your bot also talks to the other bots in the right way, so that Rebel won't notice and bots like ThrowTwiceBot won't be confused.
|
|
Jan 7, 2019 at 15:51 | comment | added | maxb |
I took the liberty of trying to improve this bot, and created CopyBot . By keeping a permanent copy of each bot, and avoiding initialization in each game, I managed to make it 5 times faster, and by defaulting to throwing 5 times when an error occurs, the win rate is a bit higher.
|
|
Jan 7, 2019 at 10:50 | comment | added | Christian Sievers |
Right, I forgot that in checks for substring (even though I've used that before). Anyway, it's enough to know it's not == to see that something more interesting is going on. Sorry for the confusion!
|
|
Jan 7, 2019 at 8:07 | comment | added | DaniO |
@ChristianSievers: any([a in bot.__class__.__name__ for a in self.allies]) is True for any bot whose name contains any element of self.allies as a substring. In local testing, I might have multiple variant instances of this bot in play, so they need to avoid each other -- otherwise I could just have checked self or self.index as in the old WisdomOfCrowds !
|
|
Jan 6, 2019 at 14:45 | comment | added | maxb | @ChristianSievers even with that fixed, there is no speedup. But I have still managed to simulate \$3*10^8\$ games, which is more than enough to get a fair scoring. | |
Jan 6, 2019 at 11:52 | comment | added | Christian Sievers |
@maxb This bot is called TleilaxuBot but has only Tleilaxu in his list of allies, so it seems that its self recognition doesn't work. So when it leads, it will ask (another instance of) itself, resulting in a caught RuntimeError: maximum recursion depth exceeded . I guess this contributes a lot to its running time.
|
|
Jan 5, 2019 at 10:48 | comment | added | maxb |
The bot looks a lot better now, and making it create its own copy of each class removes any issues with disturbing the game. If I was to give some advice, you could move the logic for creating copies of bots from make_throw to __init__ . That way, you can create a copy of each bot once, check which bot is in the lead, and call the respective make_throw . I'm not 100% sure that this would be faster, but I'm writing this because this bot uses up 50% of the total run time. I'll see if I can throw together a concept.
|
|
Jan 4, 2019 at 15:22 | comment | added | Christian Sievers | If you like to interrogate other people's bots, you might like this. | |
Jan 3, 2019 at 18:30 | comment | added | DaniO | All comments above may now be out of date as I've just updated the code with a completely rewritten version :D | |
Jan 3, 2019 at 18:10 | history | edited | DaniO | CC BY-SA 4.0 |
Complete rewrite, including change of name!
|
Jan 2, 2019 at 10:59 | comment | added | DaniO | @maxb: I just added exception-trapping to suppress any and all errors in the target make_throw(), so it should at least be runnable now. Of course, it may still corrupt the internal state of the target bot but that's not my problem ;) | |
Jan 2, 2019 at 10:55 | history | edited | DaniO | CC BY-SA 4.0 |
Added trivial exception handling round the call to the target bot's make_throw() to suppress any and all problems encountered :)
|
Jan 2, 2019 at 0:37 | comment | added | maxb | I still haven't got this bot working. Every time I include it it still gives me the same error. Until that error is fixed, I cannot add it to the high score list. The tournament officially ends in 3 days, so there's still some time to fix the issue. | |
Dec 31, 2018 at 22:10 | comment | added | Christian Sievers | I see, but your bot might still call other bots before they have been called by the controller. I don't think that would be more problematic than calling them at all, and they'd probably give good advice: roll again! Alternatively, you could use some better trivial first round strategy like roll six times or go to 20 or whatever. (But your whole tactic relies on the assumption that leading bots are bots with good strategy, which I'd doubt. Still, they have a good chance of not being too bad, and it's an interesting attempt.) | |
Dec 31, 2018 at 19:28 | comment | added | DaniO |
@ChristianSievers: I had some exception-trapping logic in there at one point -- that's how I found that OptFor2X was breaking my code by changing scores ! But having tweaked the controller to pass a copy of the scores I wasn't seeing any more exceptions, so I dropped it in this version -- obviously not enough testing, as presumably when I ran this bot it didn't happen that WisdomOfCrowds had between 1 and 13 AND OptFor2X was a leader!
|
|
Dec 31, 2018 at 19:19 | comment | added | DaniO |
@ChristianSievers: the yield False was an attempt to avoid breaking other (later) bots by calling them before they had first been called by the game itself. Also it may not really be meaningful to ask about the leaders during the first round, when some bots have not yet had a turn. So WisdonOfCrowds just accepts a single roll on its first turn; the majority-vote logic only kicks in on subsequent turns.
|
|
Dec 31, 2018 at 17:51 | comment | added | Christian Sievers |
I see no reason for the yield False statement and expect it to harm the success of your bot.
|
|
Dec 31, 2018 at 16:18 | comment | added | Christian Sievers |
OptFor2X is not prepared for the situation of having a score between 1 and 13. That's usually fine, because it won't put itself into this situation! You'd need except TypeError: or just except: to catch this problem. I think most bots (including OptFor2X ) will not be harmed by this bot, but it may spoil the internal state of bots like SlowStart and StepBot .
|
|
Dec 31, 2018 at 15:15 | comment | added | maxb |
... any question you want. The key here is that you can use other classes and call them (though you may definitely not modify them), but you may not use other objects that are part of the competition. As long as you notice that distinction, your tactic is appropriate. I noticed when I tested your bot that it made OptFor2X fail during the simulations. I don't know exactly what caused it, but removing your bot removed the error in OptFor2X . If you need any help with implementation, send me a message in the chat room, though I might not be available until tomorrow or the day after.
|
|
Dec 31, 2018 at 15:10 | comment | added | maxb |
Welcome to PPCG (again)! I like the style of this answer, and it is a unique tactic indeed. However, it is not allowed as it is currently presented. This is due to the rule "Any attempt to tinker with the controller, runtime or other submissions will be disqualified. All submissions should only work with the inputs and storage they are given." This rule is broken because you access the game_bots array, meaning that you call methods in instantiated bot objects that are part of the game. To circumvent this, you could create your own instance of each bot class, and use your local copy to ask...
|
|
Dec 31, 2018 at 0:46 | history | answered | DaniO | CC BY-SA 4.0 |