Dominion Strategy Forum

Please login or register.

Login with username, password and session length
Pages: 1 ... 8 9 [10] 11 12 13  All

Author Topic: Dominiate: a Dominion simulator that runs on the Web  (Read 247840 times)

0 Members and 2 Guests are viewing this topic.

XerxesPraelor

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1069
  • Respect: +364
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #225 on: October 03, 2013, 02:03:20 pm »
0

Um, I can't figure out how to edit Dominate, even though I've downloaded it. I don't think I can; I'm not an administer on my most used computer, so I can't install coffeescript or anything.

Because of that, could I upload code for the cards that haven't been done and maybe even a few of my fan cards and have someone else implement it in their version of it?
Logged

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #226 on: October 03, 2013, 02:10:39 pm »
0

Um, I can't figure out how to edit Dominate, even though I've downloaded it. I don't think I can; I'm not an administer on my most used computer, so I can't install coffeescript or anything.

Because of that, could I upload code for the cards that haven't been done and maybe even a few of my fan cards and have someone else implement it in their version of it?
I guess easiest would be to fork on github and send pull requests...
Logged

SCSN

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2227
  • Respect: +7140
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #227 on: October 03, 2013, 02:12:44 pm »
+1

Naive Drunk Marine Students only gets 1 in 3 against RebuildMonument.

Code: [Select]
{
  name: 'Drunk Marine Students'
  requires: ['Potion', 'University', 'Vineyard', 'Wharf']
  gainPriority: (state, my) -> [
    "University"
    "Vineyard"
    "Potion"
    "Wharf"
    "Silver"
  ]
}
I'm quite sure there are also some Apothecarys in the Drunken Marine Studens (probably against the headaches...)

He called them naive for a reason ;)
Logged

ragingduckd

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1059
  • Respect: +3527
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #228 on: October 03, 2013, 03:49:22 pm »
0

Um, I can't figure out how to edit Dominate, even though I've downloaded it. I don't think I can; I'm not an administer on my most used computer, so I can't install coffeescript or anything.

Because of that, could I upload code for the cards that haven't been done and maybe even a few of my fan cards and have someone else implement it in their version of it?

It's hard to contribute to an open-source project if you can't test your code. ;)

Try to get your admin to install CoffeeScript. If they can't or won't, you could put another OS or a Virtual Machine on a USB and boot from that, though that solution isn't for the faint of heart. Maybe just run your code on your "less used" computer?
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: Dominiate: a Dominion simulator that runs on the Web
« Reply #229 on: October 04, 2013, 01:42:23 pm »
+4

Um, I can't figure out how to edit Dominate, even though I've downloaded it. I don't think I can; I'm not an administer on my most used computer, so I can't install coffeescript or anything.

Because of that, could I upload code for the cards that haven't been done and maybe even a few of my fan cards and have someone else implement it in their version of it?

It's hard to contribute to an open-source project if you can't test your code. ;)
Logged

ragingduckd

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1059
  • Respect: +3527
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #230 on: October 04, 2013, 01:46:45 pm »
+1

Um, I can't figure out how to edit Dominate, even though I've downloaded it. I don't think I can; I'm not an administer on my most used computer, so I can't install coffeescript or anything.

Because of that, could I upload code for the cards that haven't been done and maybe even a few of my fan cards and have someone else implement it in their version of it?

It's hard to contribute to an open-source project if you can't test your code. ;)


This is embarrassingly close to true for me.
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!

XerxesPraelor

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1069
  • Respect: +364
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #231 on: October 04, 2013, 02:37:25 pm »
0

Um, I can't figure out how to edit Dominate, even though I've downloaded it. I don't think I can; I'm not an administer on my most used computer, so I can't install coffeescript or anything.

Because of that, could I upload code for the cards that haven't been done and maybe even a few of my fan cards and have someone else implement it in their version of it?

It's hard to contribute to an open-source project if you can't test your code. ;)


I can create it in some language I have on my computer, testing it there, and then do my best to transcribe it, but you're right. I'll try.
Logged

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #232 on: October 05, 2013, 03:41:27 pm »
0

I've updated the Marine Students to the original and implemented Masterpiece (including Feodum/Masterpiece), but I've lost track of the branches on github.  Which on is the master branch at the moment that is on the server? Andrew's seems to be a bit behind (e.g. doesn't have Drunken Matine Students, but the server has)
Logged

SCSN

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2227
  • Respect: +7140
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #233 on: October 05, 2013, 04:08:14 pm »
0

I've been adding stuff to the server directly while Andrew has been patiently awaiting a response to his pull-request. If you link me to the .coffee files of your strategies or just post them here I'm happy to install them as long as they don't strike me as completely terrible :P
« Last Edit: October 05, 2013, 04:09:17 pm by SheCantSayNo »
Logged

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #234 on: October 05, 2013, 04:38:54 pm »
0

So let's see, we have
(real) Drunken Marine Students
modified Beggars/Gardens to both counter Rebuild and play good Beggars/Gardens 


Also
Masterpiece/Feodum , but Masterpiece is not implemented, so you would have to merge basicAI.coffee and cards.coffee, so that is probably better done via git.


Edit: I have sent pull request to Andrew, is that the right address or still to Rob?
« Last Edit: October 05, 2013, 04:40:53 pm by DStu »
Logged

SCSN

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2227
  • Respect: +7140
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #235 on: October 05, 2013, 05:12:58 pm »
0

I've added the first two strategies, you may need to empty your cache to be able to see them.

Andrew should answer the rest of your post, as I simply don't know what to tell you :)
Logged

ragingduckd

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1059
  • Respect: +3527
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #236 on: October 05, 2013, 05:51:48 pm »
+1

Edit: I have sent pull request to Andrew, is that the right address or still to Rob?

I accepted your pull requests (without testing them).

I also made you a collaborator on my fork, so you can check into my master or create pull requests on your fork and accept them on mine yourself. SCSN is making changes directly to my master through a user account on my server, since he doesn't have a coffeescript development environment.

I don't know if there's an official master fork per se, but I'll keep hosting my repo's version on drunkensailor. If/when Rob catches up on the code, I'm happy to link to his version instead.

Edit: Added my repo's version to the main links on drunkensailor.org
« Last Edit: October 05, 2013, 05:58:00 pm 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: Dominiate: a Dominion simulator that runs on the Web
« Reply #237 on: October 14, 2013, 06:56:14 am »
+1

Hi all, I implemented Baker. Pull request is send, Andrew said I would have permissions to direktly merge or something, but I don't have the time right now to look how this works.

Anyway, there are some things to say.
Obviously, there has to be a new variable
Code: [Select]
@coinTokens
in the player class.
Then, the ai has a new function
Code: [Select]
spendCoinTokens: (state, my) ->
which as default spends as many Coin Tokens as are needed to get the best buy that it can get.  This is not very clever for non-Baker bots, because they might spend their one Coin Token in a silly situation (e.g. starting 3/4 spending 1 token to get the Smithy in T1 and buying Silver with $4).  Comparing other bots against Baker you probably want to overwrite spendCoinTokens and just hard code how it should react in the first turns, it is not that difficult anyway.  Output of this function is an integer which tells how much to spend, if you want to spend more than you have, it defaults to max.  Gives a warning in the log, not sure if I want to keep that.

The AI also has a new variable
Code: [Select]
@coinTokensSpendThisTurn
This one is intended to be able to let you manage how you spend Coin Tokens in gainPriority(state, my), e.g. you can do something like "Province" if coinTokensSpendThisTurn < 3. [Actually, I haven't tested this part, so maybe I should] (done).

And then there is BigMoneyBaker.coffee in the strategies, which is just BigMoney which buys Baker at $5.  Not optimized at all, just there for testing, so whoever has done some optimization, post it here and/or on github.

And actually I don't know if we want to have "Coin Tokens" in the log or "coin Tokens" or "Coin tokens" or "Coin tokens".  Bugfixes welcome.

That's about it, hf.

« Last Edit: October 14, 2013, 09:29:35 am by DStu »
Logged

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #238 on: October 14, 2013, 11:46:17 am »
+1

Added Candlestick Maker and Merchant Guild, which was quite trivial after Coin Tokens were implemented.

Also added support for the possibility of multiple buys in the spendCoinTokens decision, which I didn't cared for in the first version.

Edit: Moved coinTokensSpendThisTurn to the player class (access it with my.coinTokensSpendThisTurn) to better work with hypothetical states, but realized my logic has some error still, so it does not work as it should.

Edit2: some more bugfixes, I'm quite confident that it now works mostly correct, so I merged it into aiannacc/master.  my.coinTokensSpendThisTurn still does not work as I would like it to, but I'm afraid there's not much to do about this.
« Last Edit: October 15, 2013, 07:34:33 am by DStu »
Logged

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #239 on: October 16, 2013, 12:55:10 pm »
+1

Also did Plaza (not on any github repo yet), and omg is BM-Plaza strong...

:edit Or maybe I should fix bugs before I form opinions on the strength of cards
« Last Edit: October 16, 2013, 04:56:14 pm by DStu »
Logged

ragingduckd

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1059
  • Respect: +3527
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #240 on: October 17, 2013, 12:18:36 am »
0

Added Candlestick Maker and Merchant Guild, which was quite trivial after Coin Tokens were implemented.

Also added support for the possibility of multiple buys in the spendCoinTokens decision, which I didn't cared for in the first version.

Edit: Moved coinTokensSpendThisTurn to the player class (access it with my.coinTokensSpendThisTurn) to better work with hypothetical states, but realized my logic has some error still, so it does not work as it should.

Edit2: some more bugfixes, I'm quite confident that it now works mostly correct, so I merged it into aiannacc/master.  my.coinTokensSpendThisTurn still does not work as I would like it to, but I'm afraid there's not much to do about this.

Great! Thanks.

I'm getting an error when I try a strategy that includes Baker:
"Uncaught TypeError: Cannot read property 'isPrize' of undefined"

Strategy code, as entered on http://gokologs.drunkensailor.org/static/dominiate/play.html:
Code: [Select]
{
  name: 'BakerBM'
  requires: ['Baker']
  gainPriority: (state, my) -> [
    "Province"
    "Duchy" if 0 < state.gainsToEndGame() <= 5
    "Estate" if 0 < state.gainsToEndGame() <= 2
    "Gold"
    "Baker"
    "Silver"
    "Copper" if state.gainsToEndGame() <= 3
  ]
}
« Last Edit: October 17, 2013, 12:19:57 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: Dominiate: a Dominion simulator that runs on the Web
« Reply #241 on: October 17, 2013, 02:07:15 pm »
0

Can't reproduce on my instance, and on drunkensailor Baker does not run at all. Did you compile to JS with make?

Edit: I guess that's the problem as the JS does not contain Baker (but the other cards)
« Last Edit: October 17, 2013, 02:37:39 pm by DStu »
Logged

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #242 on: October 17, 2013, 03:13:01 pm »
0

Anyway, in the meantime I finished (I hope) Plaza. Don't want to merge it directly until the other issues are resolved, so ordinary pull request.  Check out
Code: [Select]
plazaDiscardPriority: (state, my) ->
to control the behaviour on what and when to discard treasures to Plaza. (default is
Code: [Select]
plazaDiscardPriority: (state, my) -> [
    "Copper"
    null
  ]       
until someone wants to improve it....)

Edit: If case someone is interested, I think I won't touch Butcher (can do the card but don't want to think about a default strategy on how to play it)
« Last Edit: October 17, 2013, 03:17:22 pm by DStu »
Logged

ragingduckd

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1059
  • Respect: +3527
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #243 on: October 17, 2013, 07:32:13 pm »
0

Can't reproduce on my instance, and on drunkensailor Baker does not run at all. Did you compile to JS with make?

Edit: I guess that's the problem as the JS does not contain Baker (but the other cards)

Oy, you're quite right. Sorry about that.

Works fine now.
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: Dominiate: a Dominion simulator that runs on the Web
« Reply #244 on: October 18, 2013, 02:57:02 am »
0

So more cards.

Finishes Plaza and Bandit Camp (and Spoils), and added the reaction to Beggar. Also improved Beggars/Gardens strategy, the possibility to react on attacks increases the winchance against DoubleMilitia from 99.5% to 99.9%

New functions for AI:
Code: [Select]
wantsToDiscardBeggar: (state) ->
wantsToPlaySpoils: (state) ->
defaults: Beggar -> true. Spoils -> true if it changes what we buy this turn. else false

Gave some trivial merge conflicts (git didn't know which of wantsToDiscardBeggar or wantsToPlaySpoils should be first in the file), so I merged everything together and pushed it upstream.
Logged

Kirian

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 7096
  • Shuffle iT Username: Kirian
  • An Unbalanced Equation
  • Respect: +9411
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #245 on: November 09, 2013, 08:43:50 pm »
0

Maybe also Beggar/Gardens with Duchy>Beggar(2--4)>Gardens>Beggar>Estate>Copper? Might be able to tie or slightly win the Duchy race and gather more points after this?

Good Lord!

/bow

I probably wouldn't save it as vanilla BeggarsGardens in the simulator, because if you don't want to counter Rebuild, you will want to play it  differently...

Just for the hell of it I tested it out vs most of the strategies in there.  It lost only to MP/Feodum... and it was able to beat most of the strategies at a 90% or so rate.
Logged
Kirian's Law of f.DS jokes:  Any sufficiently unexplained joke is indistinguishable from serious conversation.

Warfreak2

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1149
  • KC->KC->[Scavenger, Scavenger, Lookout]
  • Respect: +1324
    • View Profile
    • Music what I do
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #246 on: November 10, 2013, 04:11:19 am »
0

With Masterpiece on the board, the optimal Gardens strategy probably involves it.

How about Stonemason->2xBeggar / Gardens? If competing for Duchies, you can trash Duchies for two Gardens.
« Last Edit: November 10, 2013, 04:14:02 am by Warfreak2 »
Logged
If the only engine on the board is Procession->Conspirator, I will play it.

Holger

  • Minion
  • *****
  • Offline Offline
  • Posts: 736
  • Respect: +458
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #247 on: November 26, 2013, 06:33:08 pm »
+15

With Rebuild being so awfully strong, I've been interested to see whether removing the "+1 Action" would balance it. I expected it to remain strong, while Donald X. said that this version "couldn't compete". Since I didn't know how to add new cards to the simulator, I just "simulated" this with the existent Rebuild strategy (by ragingduckd and SheCantSayNo) by setting "WantsToRebuild" to zero when there's already a Rebuild in play, which seems to work as intended. The buying strategy is still close to optimal. This "TerminalRebuild" turns out to be significantly weaker than the original card:

TerminalRebuild loses to the strongest BM cards: Wharf, Goons, GhostShip, DoubleJack, all Cursers.

It essentially ties with Monument (51:49), Envoy (48.5:51.5), Smithy (52:48) and Courtyard (50:50), and wins against all other implemented one-card strategies (Militia, Masq., HP, Amb., Library, ...).

So BM-TerminalRebuild is about as strong as standard Smithy-BM, i.e. far from overpowered, but occasionally useful on BM boards. This seems to me to be an interesting "mediocre" card: It'd be worse in an engine, but great for slogs, or when combined with Walled Village (making it non-terminal again) or Tournament.



« Last Edit: November 26, 2013, 06:36:48 pm by Holger »
Logged

SCSN

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2227
  • Respect: +7140
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #248 on: November 26, 2013, 09:32:03 pm »
0

Nice work!

How do your results change if you remove from gainPriority the line

Code: [Select]
"Rebuild" if my.countInDeck("Rebuild") < 3 and state.countInSupply("Rebuild") == 8
Logged

Holger

  • Minion
  • *****
  • Offline Offline
  • Posts: 736
  • Respect: +458
    • View Profile
Re: Dominiate: a Dominion simulator that runs on the Web
« Reply #249 on: November 27, 2013, 08:32:26 am »
+1

Thanks. Not buying the third Rebuild changes very little; TerminalRebuild seems to become marginally (<1%) weaker against most cards, but now loses also to Monument (probably because BM-Monument tends to longer games).

I've also tried replacing one Rebuild by a Gold; this marginally helps against one card but hurts against another.
« Last Edit: November 27, 2013, 12:35:36 pm by Holger »
Logged
Pages: 1 ... 8 9 [10] 11 12 13  All
 

Page created in 0.051 seconds with 21 queries.