Dominion Strategy Forum

Please login or register.

Login with username, password and session length
Pages: [1] 2  All

Author Topic: Simulator Challenge(Dominate): Beat everything but SillyAI  (Read 13759 times)

0 Members and 1 Guest are viewing this topic.

ephesos

  • Explorer
  • *****
  • Offline Offline
  • Posts: 347
  • Shuffle iT Username: Ephesos
  • Respect: +290
    • View Profile
Simulator Challenge(Dominate): Beat everything but SillyAI
« on: November 13, 2013, 12:56:23 am »
+7

On rspeer's simulator, Dominate, beat every listed AI except SillyAI(get a win rate > 50%), but lose to SillyAI.
(I haven't figured out how to do it on Geronimoo's quite yet, but I'll get there someday...)
Logged

blueblimp

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2849
  • Respect: +1559
    • View Profile
Re: Simulator Challenge(Dominate): Beat everything but SillyAI
« Reply #1 on: November 13, 2013, 02:26:20 am »
+5

Troll solution:
Code: [Select]
# GodAI uses divine intervention except vs SillyAI.
{
  name: 'GodAI'
  author: 'blueblimp'
  requires: []
  gainPriority: (state, my) -> []
  gainValue: (state, card, my) ->
    if state.players[0].ai.name != 'SillyAI' and state.players[1].ai.name != 'SillyAI'
      my.chips = 100000
    return 1
}
Logged

ephesos

  • Explorer
  • *****
  • Offline Offline
  • Posts: 347
  • Shuffle iT Username: Ephesos
  • Respect: +290
    • View Profile
Re: Simulator Challenge(Dominate): Beat everything but SillyAI
« Reply #2 on: November 13, 2013, 10:17:07 am »
+2

Lol, alright, you can't use any moves that wouldn't work in a real game of Dominion(no giving yourself all the VP chips, no deleting your opponent from existence, etc.) Also, no conditions on the name of the other AI; you can't just make a good AI and turn it into a self curser when it hears it's facing SillyAI.
Logged

SCSN

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2227
  • Respect: +7140
    • View Profile
Re: Simulator Challenge(Dominate): Beat everything but SillyAI
« Reply #3 on: November 13, 2013, 12:04:29 pm »
0

Lol, alright, you can't use any moves that wouldn't work in a real game of Dominion(no giving yourself all the VP chips, no deleting your opponent from existence, etc.) Also, no conditions on the name of the other AI; you can't just make a good AI and turn it into a self curser when it hears it's facing SillyAI.

Are you allowed to use other means to deduce that it's playing SillyAI? E.g. I could require Scout on board as the only $4, and turn the bot into a self-curser as soon as it detects his opponent buying a Scout.

Also, what happens if my strategy requires 10 specific kingdom cards and it's matched up against a strategy requiring 2 cards not included in the original 10? (I could test this but I'm lazy lol)

And... should it also work on Andrew's implementation of Dominiate? It includes more cards and some better strategies.
Logged

ephesos

  • Explorer
  • *****
  • Offline Offline
  • Posts: 347
  • Shuffle iT Username: Ephesos
  • Respect: +290
    • View Profile
Re: Simulator Challenge(Dominate): Beat everything but SillyAI
« Reply #4 on: November 13, 2013, 09:39:55 pm »
0

Lol, alright, you can't use any moves that wouldn't work in a real game of Dominion(no giving yourself all the VP chips, no deleting your opponent from existence, etc.) Also, no conditions on the name of the other AI; you can't just make a good AI and turn it into a self curser when it hears it's facing SillyAI.

Are you allowed to use other means to deduce that it's playing SillyAI? E.g. I could require Scout on board as the only $4, and turn the bot into a self-curser as soon as it detects his opponent buying a Scout.

Also, what happens if my strategy requires 10 specific kingdom cards and it's matched up against a strategy requiring 2 cards not included in the original 10? (I could test this but I'm lazy lol)

And... should it also work on Andrew's implementation of Dominiate? It includes more cards and some better strategies.
I'm not quite sure what to exclude here, since saying exactly what's needed could give it away. For now, I'll say that your AI can't use any way to tell what cards your opponent has bought, and is not allowed to buy Curses. Additionally, you can't use the name of the strategy in any way(if I rename SillyAI to ChapelWitch, you should still lose to it)
It currently doesn't work on Andrew's version: there are some strategies that are about 1% better than it, as far as I can tell; BigMoneyBaker is actually a lot better, but that's cause the AI doesn't quite know when to hold on to Coin tokens. Also, it required a few edits to even run(I had to add in a wantsToRebuild and a wantsToJM function, otherwise it would crash)
Also, for anyone thinking about maybe doing some probability hacks(e.g. it self curses 1 out of 100 games, and I just get really unlucky 10 times vs SillyAI), I ran it for 20000+ games in a row(overnight) to determine that it really won 51% vs one strategy(it does)
Logged

Awaclus

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 11808
  • Shuffle iT Username: Awaclus
  • (´。• ω •。`)
  • Respect: +12846
    • View Profile
    • Birds of Necama
Re: Simulator Challenge(Dominate): Beat everything but SillyAI
« Reply #5 on: November 14, 2013, 03:11:14 am »
0

It currently doesn't work on Andrew's version: there are some strategies that are about 1% better than it, as far as I can tell; BigMoneyBaker is actually a lot better, but that's cause the AI doesn't quite know when to hold on to Coin tokens.
But it works on rspeer's version, because rspeer knows when to hold on to Coin tokens?
Logged
Bomb, Cannon, and many of the Gunpowder cards can strongly effect gameplay, particularly in a destructive way

The YouTube channel where I make musicDownload my band's Creative Commons albums for free

ragingduckd

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1059
  • Respect: +3527
    • View Profile
Re: Simulator Challenge(Dominate): Beat everything but SillyAI
« Reply #6 on: November 14, 2013, 04:04:51 am »
+3

Lol, alright, you can't use any moves that wouldn't work in a real game of Dominion(no giving yourself all the VP chips, no deleting your opponent from existence, etc.) Also, no conditions on the name of the other AI; you can't just make a good AI and turn it into a self curser when it hears it's facing SillyAI.

Are you allowed to use other means to deduce that it's playing SillyAI? E.g. I could require Scout on board as the only $4, and turn the bot into a self-curser as soon as it detects his opponent buying a Scout.

Also, what happens if my strategy requires 10 specific kingdom cards and it's matched up against a strategy requiring 2 cards not included in the original 10? (I could test this but I'm lazy lol)

And... should it also work on Andrew's implementation of Dominiate? It includes more cards and some better strategies.
I'm not quite sure what to exclude here, since saying exactly what's needed could give it away. For now, I'll say that your AI can't use any way to tell what cards your opponent has bought, and is not allowed to buy Curses. Additionally, you can't use the name of the strategy in any way(if I rename SillyAI to ChapelWitch, you should still lose to it)
It currently doesn't work on Andrew's version: there are some strategies that are about 1% better than it, as far as I can tell; BigMoneyBaker is actually a lot better, but that's cause the AI doesn't quite know when to hold on to Coin tokens. Also, it required a few edits to even run(I had to add in a wantsToRebuild and a wantsToJM function, otherwise it would crash)
Also, for anyone thinking about maybe doing some probability hacks(e.g. it self curses 1 out of 100 games, and I just get really unlucky 10 times vs SillyAI), I ran it for 20000+ games in a row(overnight) to determine that it really won 51% vs one strategy(it does)

What the what?!  You can actually do it?  I had assumed that this was just a silly (and rather naive) challenge.  Kudos in advance, my friend!

Hmm... okay.  Now that I know it can be done, I think I may have a decent guess, at least to the principle involved:

Start out with a variant of Beggar-Gardens that requires Ambassador and maybe some sifting cantrips.  Play it as regular Beggar-Gardens until Copper is low enough that a 3-pile is imminent.  Then either:
  • If the game is vaguely close, finish Copper for the win
  • If you're way ahead, resolve henceforth to stop playing Beggar and instead Ambassador the crap out of your deck
SillyAI, being the only published simulator strategy that doesn't really get anywhere, is the only competitor that triggers the self-destruct condition.  Its quasi-random buy strategy also makes it unlikely to suicide by 3-piling itself before you completed your self-destruction.

So at the end of the day, you've played Beggar-Gardens against any reasonable strategy and Beggar-Gardens-Cyanide against SillyAI.  Implementation is left as an exercise for SCSN.  :D

Edit: Hmm... my initial attempt was thwarted by SillyAI's silliness.  While it has rules against suicide by 3-pile, it's quite happy to suicide by buying the last Province!
« Last Edit: November 14, 2013, 05:32:26 am by ragingduckd »
Logged
Salvager Extension | Isotropish Leaderboard | Game Data | Log Search & other toys | Salvager Bug Reports

Salvager not working for me at all today. ... Please help! I can't go back to playing without it like an animal!

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: Simulator Challenge(Dominate): Beat everything but SillyAI
« Reply #7 on: November 14, 2013, 03:31:38 pm »
0

I had to add in a wantsToRebuild and a wantsToJM function, otherwise it would crash
Ot, that sounds like basicAI doesn't have these functions, which would be a bug
Logged

ragingduckd

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1059
  • Respect: +3527
    • View Profile
Re: Simulator Challenge(Dominate): Beat everything but SillyAI
« Reply #8 on: November 14, 2013, 03:54:39 pm »
0

I had to add in a wantsToRebuild and a wantsToJM function, otherwise it would crash
Ot, that sounds like basicAI doesn't have these functions, which would be a bug

Ah!  This was my bad.  I created the need for those functions when I implemented the corresponding cards, but I never added them to basicAI.
Logged
Salvager Extension | Isotropish Leaderboard | Game Data | Log Search & other toys | Salvager Bug Reports

Salvager not working for me at all today. ... Please help! I can't go back to playing without it like an animal!

ephesos

  • Explorer
  • *****
  • Offline Offline
  • Posts: 347
  • Shuffle iT Username: Ephesos
  • Respect: +290
    • View Profile
Re: Simulator Challenge(Dominate): Beat everything but SillyAI
« Reply #9 on: November 14, 2013, 11:54:37 pm »
0

It currently doesn't work on Andrew's version: there are some strategies that are about 1% better than it, as far as I can tell; BigMoneyBaker is actually a lot better, but that's cause the AI doesn't quite know when to hold on to Coin tokens.
But it works on rspeer's version, because rspeer knows when to hold on to Coin tokens?
It works on rspeer's version cause it doesn't have to face BigMoneyBaker, and so doesn't need to deal with the Coin tokens 99% of the time. It specifically fails against that strategy(because of the required Baker setup.)
That might be considered a hint to the solution(at least, you know it doesn't use Baker), but if so, even I have no idea what it hints at...
Logged

ephesos

  • Explorer
  • *****
  • Offline Offline
  • Posts: 347
  • Shuffle iT Username: Ephesos
  • Respect: +290
    • View Profile
Re: Simulator Challenge(Dominate): Beat everything but SillyAI
« Reply #10 on: November 15, 2013, 12:06:42 am »
0

Lol, alright, you can't use any moves that wouldn't work in a real game of Dominion(no giving yourself all the VP chips, no deleting your opponent from existence, etc.) Also, no conditions on the name of the other AI; you can't just make a good AI and turn it into a self curser when it hears it's facing SillyAI.

Are you allowed to use other means to deduce that it's playing SillyAI? E.g. I could require Scout on board as the only $4, and turn the bot into a self-curser as soon as it detects his opponent buying a Scout.

Also, what happens if my strategy requires 10 specific kingdom cards and it's matched up against a strategy requiring 2 cards not included in the original 10? (I could test this but I'm lazy lol)

And... should it also work on Andrew's implementation of Dominiate? It includes more cards and some better strategies.
I'm not quite sure what to exclude here, since saying exactly what's needed could give it away. For now, I'll say that your AI can't use any way to tell what cards your opponent has bought, and is not allowed to buy Curses. Additionally, you can't use the name of the strategy in any way(if I rename SillyAI to ChapelWitch, you should still lose to it)
It currently doesn't work on Andrew's version: there are some strategies that are about 1% better than it, as far as I can tell; BigMoneyBaker is actually a lot better, but that's cause the AI doesn't quite know when to hold on to Coin tokens. Also, it required a few edits to even run(I had to add in a wantsToRebuild and a wantsToJM function, otherwise it would crash)
Also, for anyone thinking about maybe doing some probability hacks(e.g. it self curses 1 out of 100 games, and I just get really unlucky 10 times vs SillyAI), I ran it for 20000+ games in a row(overnight) to determine that it really won 51% vs one strategy(it does)

What the what?!  You can actually do it?  I had assumed that this was just a silly (and rather naive) challenge.  Kudos in advance, my friend!

Hmm... okay.  Now that I know it can be done, I think I may have a decent guess, at least to the principle involved:

Start out with a variant of Beggar-Gardens that requires Ambassador and maybe some sifting cantrips.  Play it as regular Beggar-Gardens until Copper is low enough that a 3-pile is imminent.  Then either:
  • If the game is vaguely close, finish Copper for the win
  • If you're way ahead, resolve henceforth to stop playing Beggar and instead Ambassador the crap out of your deck
SillyAI, being the only published simulator strategy that doesn't really get anywhere, is the only competitor that triggers the self-destruct condition.  Its quasi-random buy strategy also makes it unlikely to suicide by 3-piling itself before you completed your self-destruction.

So at the end of the day, you've played Beggar-Gardens against any reasonable strategy and Beggar-Gardens-Cyanide against SillyAI.  Implementation is left as an exercise for SCSN.  :D

Edit: Hmm... my initial attempt was thwarted by SillyAI's silliness.  While it has rules against suicide by 3-pile, it's quite happy to suicide by buying the last Province!
This was actually an unforeseen consequence of my attempt to implement the strategy, which I found hilarious and worthy of a Challenge. The irony being that I'm still not exactly sure how I can make it beat SillyAI(well, I know one way, but it's kind of cheaty...)
Your solution is completely different from mine, but that's to be expected; I hope to see loads of wacky solutions like Ambassador all my Provinces if I have 6 of them or something(that's not the solution, btw, loses to Alt-VP like Double Goons). I will, however, say that the loss condition is intrinsic to my strategy; it's not like I just took a good strategy and tacked a loss condition to it.
I wonder if anyone will figure out exactly what I did, but I kind of hope they don't, just so that people will keep coming up with new ideas.
Logged

ragingduckd

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1059
  • Respect: +3527
    • View Profile
Re: Simulator Challenge(Dominate): Beat everything but SillyAI
« Reply #11 on: March 16, 2014, 06:19:47 am »
+6

Seeing as it's been four months, how about posting the solution?
Logged
Salvager Extension | Isotropish Leaderboard | Game Data | Log Search & other toys | Salvager Bug Reports

Salvager not working for me at all today. ... Please help! I can't go back to playing without it like an animal!

luser

  • Tactician
  • *****
  • Offline Offline
  • Posts: 447
  • Respect: +352
    • View Profile
Re: Simulator Challenge(Dominate): Beat everything but SillyAI
« Reply #12 on: March 24, 2014, 05:54:51 am »
+1

What about following idea.

Requires kingdom with chapel, militia, masquerade, king's court.

Idea is that it will wait 15 turns and when opponent got somewhere it uses pin, otherwise starts buying curses.
Logged

c4master

  • Moneylender
  • ****
  • Offline Offline
  • Posts: 167
  • Respect: +56
    • View Profile
Re: Simulator Challenge(Dominate): Beat everything but SillyAI
« Reply #13 on: May 01, 2014, 04:13:32 am »
0

I'm pretty confident, this strategy will fail against rushes like workshop/garden. And what about strategies that involve Militia or Goons on their own? Are there none of these?
Logged

luser

  • Tactician
  • *****
  • Offline Offline
  • Posts: 447
  • Respect: +352
    • View Profile
Re: Simulator Challenge(Dominate): Beat everything but SillyAI
« Reply #14 on: May 01, 2014, 08:58:19 am »
0

I'm pretty confident, this strategy will fail against rushes like workshop/garden. And what about strategies that involve Militia or Goons on their own? Are there none of these?

Too slow.  You need to gain 26 cards to end game on piles. That is turn 14 if you always gain 2 cards from turn 3. You typically miss that few times which is enough to play pin without support.

Or I could simply add quarry which creates pin on turn 10.
Logged

c4master

  • Moneylender
  • ****
  • Offline Offline
  • Posts: 167
  • Respect: +56
    • View Profile
Re: Simulator Challenge(Dominate): Beat everything but SillyAI
« Reply #15 on: May 02, 2014, 02:14:25 am »
0

But how would you measure "not going anywhere"? Even silly AI might buy a Province by that time. So your Pin would nail down any opponent except maybe some very strong combo.

In my opinion, defining a kingdom in which you can easily determine whether it is silly AI or any other is the easiest way to do this. So you would add like 2 cards that don't fit in any strategy and look if they are bought. On the other hand, this looks like a loophole.
Logged

luser

  • Tactician
  • *****
  • Offline Offline
  • Posts: 447
  • Respect: +352
    • View Profile
Re: Simulator Challenge(Dominate): Beat everything but SillyAI
« Reply #16 on: May 02, 2014, 06:00:47 am »
0

But how would you measure "not going anywhere"? Even silly AI might buy a Province by that time. So your Pin would nail down any opponent except maybe some very strong combo.

Does not matter much. Even if sillyAI could bought province in 49% of games it would still beat a pin in 51% of games where it did not buy province.

Also challenge was versus every published opponent. There is currently no published bot that piles before turn 15. Also this challenge would be impossible without that otherwise just let play a strategy with itself.
Logged

c4master

  • Moneylender
  • ****
  • Offline Offline
  • Posts: 167
  • Respect: +56
    • View Profile
Re: Simulator Challenge(Dominate): Beat everything but SillyAI
« Reply #17 on: May 03, 2014, 03:33:32 am »
0

Ok, so you're relying on silly AI being so much worse than any other that you can split those from silly AI by checking the Province pile at some point (say, turn 14 or 15). I wonder if that holds true, I really can't say.
Logged

luser

  • Tactician
  • *****
  • Offline Offline
  • Posts: 447
  • Respect: +352
    • View Profile
Re: Simulator Challenge(Dominate): Beat everything but SillyAI
« Reply #18 on: May 03, 2014, 06:58:00 am »
0

I tried to implement pin, a bot now could get components easily. A first problem is that with kc-masq hand bot refuses kc a masquerade. How could I tell him what to pass and what to trash?

A starting bot is here:
Code: [Select]
{
  name: 'sillyfriend'
  requires: ['Militia', 'Masquerade', "Quarry", "King's Court"]
  gainPriority: (state, my) -> [
    "King's Court" if my.countInDeck("King's Court") < 2
    'Militia' if (my.countInDeck("King's Court") >= 2) && (my.countInDeck("Militia") < 1)
    "Masquerade" if my.countInDeck("Masquerade") < 2
    "Quarry" if my.countInDeck("Quarry") < 3
  ]
}
Logged

liopoil

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2587
  • Respect: +2479
    • View Profile
Re: Simulator Challenge(Dominate): Beat everything but SillyAI
« Reply #19 on: May 03, 2014, 11:28:01 am »
0

from reading ephesos's comments, I get the sense that his bot doesn't play differently against sillyAI, and doesn't try to figure out if it's sillyAI or not. I don't know exactly how sillyAI plays, but I think its possible that ephesos's strategy uses some specific cards such that the strategy doesn't work if the opponent contests those piles, and sillyAI is the only one that would. I'm thinking something like hermit/market square perhaps.
Logged

luser

  • Tactician
  • *****
  • Offline Offline
  • Posts: 447
  • Respect: +352
    • View Profile
Re: Simulator Challenge(Dominate): Beat everything but SillyAI
« Reply #20 on: May 03, 2014, 03:48:28 pm »
0

from reading ephesos's comments, I get the sense that his bot doesn't play differently against sillyAI, and doesn't try to figure out if it's sillyAI or not. I don't know exactly how sillyAI plays, but I think its possible that ephesos's strategy uses some specific cards such that the strategy doesn't work if the opponent contests those piles, and sillyAI is the only one that would. I'm thinking something like hermit/market square perhaps.

That just makes implementation more technical as you among other things cannot check number of provinces that are left for decisions.

It is still doable by constructing a kc/wharf/bridge engine that in his megaturn buys 9 scouts, bureaucrats and 8 watchtowers, 7 estates and trashes these with watchtower. SillyAI probably bought one of them and will win, otherwise we win with real megaturn.
Logged

Holger

  • Minion
  • *****
  • Offline Offline
  • Posts: 736
  • Respect: +458
    • View Profile
Re: Simulator Challenge(Dominate): Beat everything but SillyAI
« Reply #21 on: May 05, 2014, 10:09:05 am »
0

from reading ephesos's comments, I get the sense that his bot doesn't play differently against sillyAI, and doesn't try to figure out if it's sillyAI or not. I don't know exactly how sillyAI plays, but I think its possible that ephesos's strategy uses some specific cards such that the strategy doesn't work if the opponent contests those piles, and sillyAI is the only one that would. I'm thinking something like hermit/market square perhaps.

That just makes implementation more technical as you among other things cannot check number of provinces that are left for decisions.

It is still doable by constructing a kc/wharf/bridge engine that in his megaturn buys 9 scouts, bureaucrats and 8 watchtowers, 7 estates and trashes these with watchtower. SillyAI probably bought one of them and will win, otherwise we win with real megaturn.

But ephesos said that he did not make his strategy intentionally bad in order to lose against SillyAI, it was unintended:
This was actually an unforeseen consequence of my attempt to implement the strategy, which I found hilarious and worthy of a Challenge. The irony being that I'm still not exactly sure how I can make it beat SillyAI(well, I know one way, but it's kind of cheaty...)

Still, your idea might work if there is a strategy that "reasonably" comes close to empty three kingdom piles before winning; SillyAI seems to be the only implemented strategy that can gain more than two different types of kingdom cards...


from reading ephesos's comments, I get the sense that his bot doesn't play differently against sillyAI, and doesn't try to figure out if it's sillyAI or not. I don't know exactly how sillyAI plays, but I think its possible that ephesos's strategy uses some specific cards such that the strategy doesn't work if the opponent contests those piles, and sillyAI is the only one that would. I'm thinking something like hermit/market square perhaps.
That seems possible, but I think H/MS still wins against SillyAI if the piles are contested. SillyAI always gains a random card of the highest cost it can afford. So against H/MS, it would also gain Silvers every third time it has $3.(Also, Hermit and Market Square aren't implemented yet on Dominiate...)
Logged

qmech

  • Torturer
  • *****
  • Offline Offline
  • Posts: 1918
  • Shuffle iT Username: qmech
  • What year is it?
  • Respect: +2320
    • View Profile
Re: Simulator Challenge(Dominate): Beat everything but SillyAI
« Reply #22 on: May 06, 2014, 03:19:50 am »
+2

This is going to be like Fermat's Last Theorem all over again.
Logged

ephesos

  • Explorer
  • *****
  • Offline Offline
  • Posts: 347
  • Shuffle iT Username: Ephesos
  • Respect: +290
    • View Profile
Re: Simulator Challenge(Dominate): Beat everything but SillyAI
« Reply #23 on: May 16, 2014, 03:56:00 am »
+2

Well, it's been a while, huh? I sort of forgot about this thread three semesters ago, and school and work happened. But finally, I had time to go back, sit down, and with the help of a friend, fix the Big Money Baker coin token thing. I present to you, my solution:

#Ruthlessly executes unsuspecting bots with the KC/Goons/Masquerade pin
{
  name: 'Pin'
  requires: ["Chapel", "King's Court", "Masquerade", "Goons"]
  gainPriority: (state, my) -> [
    "King's Court" if my.countInDeck("King's Court") < 2
    "Goons" if my.countInDeck("Goons") == 0
    "Gold" if my.countInDeck("King's Court") < 2
   
    # If this bot somehow gets rid of its chapel later in the game,
    # it won't try to acquire another one.
    "Chapel" if my.coins <= 4 and my.countInDeck("Chapel") == 0 and my.turnsTaken <= 2
    # Would be three, if it wasn't for that nasty Baker 4/4 split
    "Masquerade" if my.countInDeck("Masquerade") == 0
    "Silver" if my.countInDeck("King's Court") < 2
    "Gold" if my.turnsTaken >= 50 #MAKE IT STOP
    "Duchy" if my.turnsTaken >= 70
    "Estate" if my.turnsTaken >= 90
    "Chapel" if my.countInDeck("Copper") > 7 and my.countInDeck("Chapel") < 2 #just to counter that nasty DoubleMountebank. Guess you sometimes do have to buy a second Chapel
  ]

  trashPriority: (state, my) -> [
    "Curse"
    "Estate"
    "Copper"
    "Silver" if my.countInDeck("King's Court") == 2 and my.countInDeck('Goons') == 1
    "Chapel"
    #kill anything once the pin starts
    "Gold" if my.countInDeck("King's Court") == 2 and my.countInDeck('Goons') == 1
    "Province" if my.countInDeck("King's Court") ==2 and my.countInDeck('Goons') == 1
    "Duchy" if my.countInDeck("King's Court") == 2 and my.countInDeck('Goons') == 1
    "King's Court" if my.countInDeck("King's Court") > 2 and my.countInDeck('Goons') == 1
    "Goons" if my.countInDeck("King's Court") == 2 and my.countInDeck('Goons') > 1
    "Masquerade" if my.countInDeck("King's Court") == 2 and my.countInDeck('Goons') == 1 and my.countInDeck('Chapel') == 0
    #anything else just trash
    "Witch"
    "Platinum"
    "Colony"
    "Wharf"
    "Monument"
    "Library"
    "Bank"
    "Envoy"
    "Smithy"
    "Mountebank"
    "Young Witch"
    "Ambassador"
    "Ghost Ship"
    "Jack of All Trades"
    "Militia"
    "Moneylender"
    "Adventurer"
    "Bazaar"
    "Bridge"
    "Chancellor"
    "Coppersmith"
    "Courtyard"
    "Hunting Party"
    "Nobles"
    "Remake"
    "Royal Seal"
    "Scheme"
    "Tournament"
    "Baron"
    #added these for Andrew's version
    "Advisor"
    "Beggar"
    "Gardens"
    "Journeyman"
    "Baker"
    "Vineyard"
    "University"
    "Scrying Pool"
    "Alchemist"
    "Potion"
    "Rats"
    "Masterpiece"
    "Feodum"
    "Duke"
    "Rebuild"
    "Horse Traders"
    "Rogue"
    "Plaza"
    #huh, new strategies, guess it has been a while
    "Oasis"
    "Watchtower"
    "Develop"
    "Festival"
    "Talisman"
  ]
 
  wantsToRebuild: (state, my) ->
    return 0
 
  wantsToJM: (state, my) ->
    false
 
  multipliedPriority: (state, card, my) -> [
    "King's Court"
    "Goons"
    "Masquerade"
    "Chapel"
  ]
}         

Yeah, it's kind of funny really. I was working on alt-win conditions I thought would be interesting to simulate, and I knew of the strategy, so I tried to get an AI to play it. I even played it through on a friend once, just to see exactly how it played. (It was extremely fun for me, but not for said friend. Reading it, you can guess why.)

I know the SillyAI thing was a bit of a stretch; coded "properly" (naming everything possible) :P I could have beaten SillyAI, but I chose not to, since doing so would be long and tedious. There has to be a rock for every scissors, and for my strategy(and from lack of patience), this was it.

Next challenge: Design something that beats this, using only the cards I named to trash, of course   If you want, you can use any other card, if you add its name to the trash section

Couldn't get it to work on Geronimoo's, of course. He just has buy priorities, not trash or multiplied action priorities , and I couldn't get the AI to trash everything it was given   So that's why it's only Dominate. I guess it says that Dominate is better (at least, in some ways) than Geronimoo's, and if we ever want to get to a true AI that plays like a real player would, we'll need to go in that direction. Or not. Who knows?

Hope you all had fun trying to solve this. If anyone comes up with another solution, it'd be really interesting to see.
« Last Edit: May 16, 2014, 04:30:38 am by ephesos »
Logged

ephesos

  • Explorer
  • *****
  • Offline Offline
  • Posts: 347
  • Shuffle iT Username: Ephesos
  • Respect: +290
    • View Profile
Re: Simulator Challenge(Dominate): Beat everything but SillyAI
« Reply #24 on: May 16, 2014, 04:21:26 am »
+1

I tried to implement pin, a bot now could get components easily. A first problem is that with kc-masq hand bot refuses kc a masquerade. How could I tell him what to pass and what to trash?

A starting bot is here:
Code: [Select]
{
  name: 'sillyfriend'
  requires: ['Militia', 'Masquerade', "Quarry", "King's Court"]
  gainPriority: (state, my) -> [
    "King's Court" if my.countInDeck("King's Court") < 2
    'Militia' if (my.countInDeck("King's Court") >= 2) && (my.countInDeck("Militia") < 1)
    "Masquerade" if my.countInDeck("Masquerade") < 2
    "Quarry" if my.countInDeck("Quarry") < 3
  ]
}
Wow, this was actually really close... Kudos! All I did past this, I guess, is I figured out how to tell him what to pass and trash(They're both actually the same priority in the code). And, I bought Chapel. That really helps, especially against things like DoubleMountebank
« Last Edit: May 16, 2014, 04:30:00 am by ephesos »
Logged
Pages: [1] 2  All
 

Page created in 0.069 seconds with 20 queries.