Dominion Strategy Forum

Please login or register.

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

Author Topic: Isotropic bot proof of concept  (Read 5280 times)

0 Members and 1 Guest are viewing this topic.

blueblimp

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2849
  • Respect: +1559
    • View Profile
Isotropic bot proof of concept
« on: February 26, 2012, 11:16:27 pm »
+7

I've made a simple bot that plays on isotropic according to WanderingWinder's BigMoneyUltimate buy rules.

Demo video: http://www.youtube.com/watch?v=Iw4LZG7e9d0

I'm curious whether there is interest in being able to play against bots. The implementation is via a Chrome extension, which I haven't made public yet because it's not very polished.

This is only a proof of concept, so it has some major limitations:
  • Currently it doesn't know how to make any choices, such as when playing against discard attacks. This would require play rules like the simulators have.
  • It can't start games itself. I do that manually.
Logged

Forge!!!

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 248
  • Respect: +128
    • View Profile
Re: Isotropic bot proof of concept
« Reply #1 on: February 26, 2012, 11:45:28 pm »
+1

I feel like this should be IBM's next big goal.
Logged

Titandrake

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2210
  • Respect: +2856
    • View Profile
Re: Isotropic bot proof of concept
« Reply #2 on: February 27, 2012, 12:16:47 am »
0

This reminds me of someone a while back who called themselves "moneybot". They essentially just played BM. I forget what rank s/he got up to (I want to say 19?), but a more polished version of this bot could be interesting in that regard.

That being said, doing choices is a fairly large issue. Idk how difficult starting new games and ending finished games would be, but my instinct is that it would be easier when compared to the choice problem.

Bah, I'm rambling. Nice work.
Logged
I have a blog! It's called Sorta Insightful. Check it out?

blueblimp

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2849
  • Respect: +1559
    • View Profile
Re: Isotropic bot proof of concept
« Reply #3 on: February 27, 2012, 12:34:46 am »
0

This reminds me of someone a while back who called themselves "moneybot". They essentially just played BM. I forget what rank s/he got up to (I want to say 19?), but a more polished version of this bot could be interesting in that regard.

Yeah, I'm tempted to let a robot loose on the leaderboard and see how it does. On the other hand, I don't want to inadvertently cause damage to the leaderboard quality, so I don't know whether this is a good idea. If I ever did this, I'd make sure that the presence of the bot is announced by status message (similar to what the point counting extension does) so that people could avoid the bot if they wanted.

Quote
That being said, doing choices is a fairly large issue. Idk how difficult starting new games and ending finished games would be, but my instinct is that it would be easier when compared to the choice problem.

Interacting with the Isotropic UI is actually pretty easy, because the HTML is very clean (props to DougZ). The trickier part is actually deciding on a choice, but this is a problem that Geronimoo has already solved in his simulator, so maybe the extension could interface with the simulator to make decisions. It's really quite boring to implement all this, though.
Logged

rrenaud

  • Administrator
  • *****
  • Offline Offline
  • Posts: 991
  • Uncivilized Barbarian of Statistics
  • Respect: +1197
    • View Profile
    • CouncilRoom
Re: Isotropic bot proof of concept
« Reply #4 on: February 27, 2012, 12:38:17 am »
+4

I'd say

1) release the code.
2) run it on iso, even letting people start games against it automatically, just make clear its a bot.
Logged

jonts26

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2746
  • Shuffle iT Username: jonts
  • Respect: +3671
    • View Profile
Re: Isotropic bot proof of concept
« Reply #5 on: February 27, 2012, 12:57:43 am »
0

This is pretty cool. One question: why does it click each treasure separately. Can't you have the code just hit the +$ button?
Logged

blueblimp

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2849
  • Respect: +1559
    • View Profile
Re: Isotropic bot proof of concept
« Reply #6 on: February 27, 2012, 01:27:12 am »
0

This is pretty cool. One question: why does it click each treasure separately. Can't you have the code just hit the +$ button?

It shouldn't be hard to hit the +$ instead. The reason it clicks treasure separately is that it's a little easier to find the cards to click than it is to find the buttons (just because of how the HTML is written) and that fundamentally the +$ is only a shortcut so it won't always work (e.g. when Grand Market is on the board). I also had something in mind about only playing just enough treasure to make the desired buy instead of playing all treasure, but right now the bot just plays all its treasure anyway.
Logged

pst

  • Minion
  • *****
  • Offline Offline
  • Posts: 584
  • Respect: +906
    • View Profile
Re: Isotropic bot proof of concept
« Reply #7 on: February 27, 2012, 09:05:17 am »
0

Currently it doesn't know how to make any choices, such as when playing against discard attacks. This would require play rules like the simulators have.

Cool! So if it gets questions now, will it just time-out? Maybe you could add some fall-back mechanism that just picks some random choice whenever it gets a question it doesn't know about. (What to send when opponent plays Masquerade, what to make opponent discard after Envoy, if it wants to discard when opponent plays Vault, etc. etc.)

Of course random choices are really bad, but just to make sure it doesn't time out, and then you could add specific code for as many cases as you care to. Some questions would come up so very seldom anyway. (Does it want to trash its Fool's Gold when opponent gets Province? Well, for that to be an issue someone must have given it a FG to begin with, which would be very unusual.)
Logged

boloni

  • Steward
  • ***
  • Offline Offline
  • Posts: 25
  • Respect: +8
    • View Profile
Re: Isotropic bot proof of concept
« Reply #8 on: February 27, 2012, 10:32:48 am »
+5

I also wrote an isotropic bot. My bot doesn't run in a browser. It communicates directly with the isotropic server.

I wrote it in coffeeScript, because I want to use Dominiate to make the decisions. For now it just chooses randomly.
I attached the code if somebody wants to have a look. I'll upload it to github tomorrow when I have more time.

Maybe we can work together somehow.
Logged

Davio

  • 2012 Dutch Champion
  • *
  • Offline Offline
  • Posts: 4787
  • Respect: +3413
    • View Profile
Re: Isotropic bot proof of concept
« Reply #9 on: February 27, 2012, 10:43:23 am »
+1

These topics make me sad I don't have more free time.  :-\

Being a software programmer by trade, I'd be very interested to pick up some of these projects, but my wife, my unborn child, my unbuilt house, my job and my social life don't let me. :)
Logged

BSG: Cagprezimal Adama
Mage Knight: Arythea

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: Isotropic bot proof of concept
« Reply #10 on: February 27, 2012, 10:52:41 am »
0

I also wrote an isotropic bot. My bot doesn't run in a browser. It communicates directly with the isotropic server.

I wrote it in coffeeScript, because I want to use Dominiate to make the decisions. For now it just chooses randomly.
I attached the code if somebody wants to have a look. I'll upload it to github tomorrow when I have more time.

Maybe we can work together somehow.

That being also coffeescript, what would we have to do to get this merged with the AI from Dominiate?
Logged

ecq

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 224
  • Respect: +162
    • View Profile
Re: Isotropic bot proof of concept
« Reply #11 on: February 27, 2012, 10:57:52 am »
0

I also wrote an isotropic bot. My bot doesn't run in a browser. It communicates directly with the isotropic server.

I wrote it in coffeeScript, because I want to use Dominiate to make the decisions. For now it just chooses randomly.
I attached the code if somebody wants to have a look. I'll upload it to github tomorrow when I have more time.

Maybe we can work together somehow.

Nice!  Please the github link once it's up.  I've been thinking that it'd be nice to have bots speak the Isotropic protocol to separate game logic from AI.  I'm really excited that someone else has done the hard work to reverse the protocol.



For bots interacting with Isotropic (including this one and the OP's), it'd be nice to embed a hard-to-remove status message and/or chat messages that made it clear that the player was a bot.  I could see this wrecking Isotropic otherwise.
Logged

DG

  • Governor
  • *****
  • Offline Offline
  • Posts: 4074
  • Respect: +2624
    • View Profile
Re: Isotropic bot proof of concept
« Reply #12 on: February 27, 2012, 11:27:25 am »
0

I would suggest sending an e-mail to Doug and asking him whether he has any objections to you

 (1) using the bot on iso yourself
 (2) releasing the code for other people to use on iso.

I can see problems once a number of people create a number of bots for a variety of reasons especially if the bots can start their own games.
Logged

rrenaud

  • Administrator
  • *****
  • Offline Offline
  • Posts: 991
  • Uncivilized Barbarian of Statistics
  • Respect: +1197
    • View Profile
    • CouncilRoom
Re: Isotropic bot proof of concept
« Reply #13 on: February 27, 2012, 11:34:18 am »
+2

Ask forgiveness, not permission!

(And don't be a dick, by say, generating thousands of bot vs bot games in a day).
Logged

pst

  • Minion
  • *****
  • Offline Offline
  • Posts: 584
  • Respect: +906
    • View Profile
Re: Isotropic bot proof of concept
« Reply #14 on: February 27, 2012, 11:51:36 am »
+1

If bots will play on Isotropic I think it would be useful with a I-AM-A-BOT bit in the user info, and an "accept bots" option for automatch.

/not a Cylon
Logged

jonts26

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2746
  • Shuffle iT Username: jonts
  • Respect: +3671
    • View Profile
Re: Isotropic bot proof of concept
« Reply #15 on: February 27, 2012, 11:59:40 am »
+1

Well I don't know that iso will be around long enough for DougZ to worry about adding bot features at this point, but a standard naming convention would be helpful. maybe preface all names with [BOT] or something.
Logged

blueblimp

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2849
  • Respect: +1559
    • View Profile
Re: Isotropic bot proof of concept
« Reply #16 on: February 27, 2012, 03:42:30 pm »
0

I also wrote an isotropic bot. My bot doesn't run in a browser. It communicates directly with the isotropic server.

I wrote it in coffeeScript, because I want to use Dominiate to make the decisions. For now it just chooses randomly.
I attached the code if somebody wants to have a look. I'll upload it to github tomorrow when I have more time.

Maybe we can work together somehow.

I'm pretty sure your method is better, since it doesn't need to worry about UI lag. I was considering switching to talking directly to the server, so it's very cool to see that you've already done this. I've attached the source code I have to this post in case you're curious how my bot drives the interface. I couldn't find a better method than polling to figure out when to make actions, which made the bot slower than it would be by using direct communication.
Logged

blueblimp

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2849
  • Respect: +1559
    • View Profile
Re: Isotropic bot proof of concept
« Reply #17 on: February 27, 2012, 03:49:47 pm »
0

Currently it doesn't know how to make any choices, such as when playing against discard attacks. This would require play rules like the simulators have.

Cool! So if it gets questions now, will it just time-out? Maybe you could add some fall-back mechanism that just picks some random choice whenever it gets a question it doesn't know about. (What to send when opponent plays Masquerade, what to make opponent discard after Envoy, if it wants to discard when opponent plays Vault, etc. etc.)

Of course random choices are really bad, but just to make sure it doesn't time out, and then you could add specific code for as many cases as you care to. Some questions would come up so very seldom anyway. (Does it want to trash its Fool's Gold when opponent gets Province? Well, for that to be an issue someone must have given it a FG to begin with, which would be very unusual.)

It doesn't time-out, but only because I'm sitting there watching it play and helping it out when it doesn't know what to do. That's a nice advantage of driving the interface instead of communicating directly with the server.
Logged
Pages: [1]
 

Page created in 0.057 seconds with 22 queries.