Dominion Strategy Forum

Please login or register.

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

Author Topic: Simulator minor fixes  (Read 2279 times)

0 Members and 1 Guest are viewing this topic.

Geronimoo

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1046
  • Respect: +838
    • View Profile
    • Geronimoo's Dominion Simulator
Simulator minor fixes
« on: August 21, 2011, 09:01:00 am »
0

I released a new version with some minor fixes Download it here.

Also I added a new bot (NGN - Plenty Horny) that can be used on the board of WanderingWinder's latest article. It will crush the Duchy/Duke strategy (COMBO - Duchy/Duke/HT).
Logged

Thisisnotasmile

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1493
  • Respect: +670
    • View Profile
Re: Simulator minor fixes
« Reply #1 on: August 21, 2011, 09:40:02 am »
0

Thank you for making it resizable!
Logged

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1487
    • View Profile
Re: Simulator minor fixes
« Reply #2 on: August 23, 2011, 02:25:10 am »
0

A little bug report from me:

Version 1.1.0

I have problems with the copy/paste-Button, especially with the Paste-part of it. It works fine in the beginning, but when I there already are 2 bots in the simulator and I want to replace one by one from my clipboard, I can not use Copy/Paste as this would put the present bot in the clipboard.
When I first delete the present bot and press the Copy/Paste button afterwards, I get a NullPointerException.

Code: [Select]
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at be.aga.dominionSimulator.gui.DomGui.actionPerformed(DomGui.java:326)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
at java.awt.Component.processMouseEvent(Component.java:6288)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6053)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4651)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4481)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4481)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:643)
at java.awt.EventQueue.access$000(EventQueue.java:84)
at java.awt.EventQueue$1.run(EventQueue.java:602)
at java.awt.EventQueue$1.run(EventQueue.java:600)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:616)
at java.awt.EventQueue$2.run(EventQueue.java:614)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:613)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Logged

DG

  • Governor
  • *****
  • Offline Offline
  • Posts: 4067
  • Respect: +2608
    • View Profile
Re: Simulator minor fixes
« Reply #3 on: August 24, 2011, 10:02:58 am »
0

The simulator seems to store the sample game logs in a hidden directory with a variety of other temporary files. Are these files ever cleaned out by the operating system or the simulator?
Logged

Graystripe77

  • Tactician
  • *****
  • Offline Offline
  • Posts: 421
  • 1.61803398874989...
  • Respect: +92
    • View Profile
    • Dreamkeeperscomic.com
Re: Simulator minor fixes
« Reply #4 on: August 24, 2011, 01:28:41 pm »
0

Can you make a list of 'gain' rules separate from buy rules, for cards like workshop and ironworks?
Logged

Geronimoo

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1046
  • Respect: +838
    • View Profile
    • Geronimoo's Dominion Simulator
Re: Simulator minor fixes
« Reply #5 on: August 24, 2011, 01:55:14 pm »
0

@DG: the game logs are indeed save to your hard drive in your default temp-directory. They are not cleaned up by the simulator. No other files are saved. They can easily be found (and deleted) because they all start with "SimulatorSampleGame...".

@Graystripe: can you give an example where what's in your buy rules isn't the appropriate card to gain for Workshop or Ironworks?
Logged

DG

  • Governor
  • *****
  • Offline Offline
  • Posts: 4067
  • Respect: +2608
    • View Profile
Re: Simulator minor fixes
« Reply #6 on: August 24, 2011, 02:50:58 pm »
0

If there is ever any supporting documentation for the simulator, I'll request that information about these files is included. They can easily go under the radar and clog up people's disk space. A menu option to delete sample games would be good if that's easy to do.
Logged

Graystripe77

  • Tactician
  • *****
  • Offline Offline
  • Posts: 421
  • 1.61803398874989...
  • Respect: +92
    • View Profile
    • Dreamkeeperscomic.com
Re: Simulator minor fixes
« Reply #7 on: August 24, 2011, 04:49:02 pm »
0

In a strategy I like to play, I go big money while using 1-2 ironworks to gain caravans. I never buy the caravans.
Logged

rinkworks

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1316
  • Respect: +918
    • View Profile
    • RinkWorks
Re: Simulator minor fixes
« Reply #8 on: August 24, 2011, 05:02:25 pm »
0

@Graystripe: can you give an example where what's in your buy rules isn't the appropriate card to gain for Workshop or Ironworks?

I suspect the buy rules are exactly what you want for Workshop, but with Ironworks the bonuses can change the decision.  If you have $7 to spend, you might want to grab a Silver for the extra $1 even if Silver isn't your first choice for $4 or less.  If Great Hall or Island is on the table, the chances of wanting to use Ironworks to grab one of those -- without ever wanting to actually *buy* one -- is pretty high.
Logged

michaeljb

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1395
  • Shuffle iT Username: michaeljb
  • Respect: +2041
    • View Profile
Re: Simulator minor fixes
« Reply #9 on: August 24, 2011, 05:40:06 pm »
0

In a strategy I like to play, I go big money while using 1-2 ironworks to gain caravans. I never buy the caravans.

Maybe set the buy rules for Caravans so that it's only bought with 0 treasures in play? I imagine this would idea would also work for restricting Ironworks to getting Great Halls.

Code: [Select]
   <buy name="Caravan">
      <condition>
         <left type="countCardsInPlay" attribute="Copper"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
      <condition>
         <left type="countCardsInPlay" attribute="Silver"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
      <condition>
         <left type="countCardsInPlay" attribute="Gold"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
      <condition>
         <left type="countCardsInPlay" attribute="Platinum"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
Logged

Graystripe77

  • Tactician
  • *****
  • Offline Offline
  • Posts: 421
  • 1.61803398874989...
  • Respect: +92
    • View Profile
    • Dreamkeeperscomic.com
Re: Simulator minor fixes
« Reply #10 on: August 24, 2011, 05:47:16 pm »
0

In a strategy I like to play, I go big money while using 1-2 ironworks to gain caravans. I never buy the caravans.

Maybe set the buy rules for Caravans so that it's only bought with 0 treasures in play? I imagine this would idea would also work for restricting Ironworks to getting Great Halls.

Code: [Select]
   <buy name="Caravan">
      <condition>
         <left type="countCardsInPlay" attribute="Copper"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
      <condition>
         <left type="countCardsInPlay" attribute="Silver"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
      <condition>
         <left type="countCardsInPlay" attribute="Gold"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
      <condition>
         <left type="countCardsInPlay" attribute="Platinum"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>

Hmmm, haven't tried that, thanks.
Logged

Geronimoo

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1046
  • Respect: +838
    • View Profile
    • Geronimoo's Dominion Simulator
Re: Simulator minor fixes
« Reply #11 on: August 24, 2011, 05:48:33 pm »
0

You can also use the "available $" - condition to differentiate between buying and gaining a card (through Remodel, Ironworks etc)

Here's an easy example of a bot that will gain Great Halls with his Ironworks, but will never buy Great Halls:

Code: [Select]
<player name="_Ironworks">
   <buy name="Province"/>
   <buy name="Duchy">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="5.0"/>
      </condition>
   </buy>
   <buy name="Estate">
      <condition>
         <left type="countCardsInSupply" attribute="Province"/>
         <operator type="smallerOrEqualThan" />
         <right type="constant" attribute="2.0"/>
      </condition>
   </buy>
   <buy name="Gold"/>
   <buy name="Ironworks">
      <condition>
         <left type="countCardsInDeck" attribute="Ironworks"/>
         <operator type="smallerThan" />
         <right type="constant" attribute="1.0"/>
      </condition>
   </buy>
   <buy name="Great_Hall">
      <condition>
         <left type="countAvailableMoney"/>
         <operator type="equalTo" />
         <right type="constant" attribute="0.0"/>
      </condition>
   </buy>
   <buy name="Silver"/>
</player>
Logged

michaeljb

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1395
  • Shuffle iT Username: michaeljb
  • Respect: +2041
    • View Profile
Re: Simulator minor fixes
« Reply #12 on: August 24, 2011, 11:15:16 pm »
0

And of course, there's a simpler solution lol  :D
Logged
Pages: [1]
 

Page created in 0.08 seconds with 20 queries.