Improved scripts for witch and Ill-Gotten Gains:
<player name="Witch by WW"
author="WanderingWinder"
description="Witch is probably the strongest attack card in the game.">
<type name="UserCreated"/>
<type name="Competitive"/>
<type name="Province"/>
<type name="BigMoney"/>
<type name="Bot"/>
<type name="Attacking"/>
<type name="SingleCard"/>
<type name="TwoPlayer"/>
<buy name="Province">
<condition>
<left type="getTotalMoney"/>
<operator type="greaterThan" />
<right type="constant" attribute="20.0"/>
</condition>
</buy>
<buy name="Duchy">
<condition>
<left type="countCardsInSupply" attribute="Province"/>
<operator type="smallerOrEqualThan" />
<right type="constant" attribute="5.0"/>
</condition>
</buy>
<buy name="Duchy">
<condition>
<left type="getTotalMoney"/>
<operator type="greaterThan" />
<right type="constant" attribute="32.0"/>
</condition>
</buy>
<buy name="Estate">
<condition>
<left type="gainsNeededToEndGame"/>
<operator type="smallerOrEqualThan" />
<right type="constant" attribute="3.0"/>
</condition>
</buy>
<buy name="Witch">
<condition>
<left type="countCardsInDeck" attribute="Witch"/>
<operator type="equalTo" />
<right type="constant" attribute="0.0"/>
</condition>
</buy>
<buy name="Gold"/>
<buy name="Duchy">
<condition>
<left type="countCardsInSupply" attribute="Province"/>
<operator type="smallerOrEqualThan" />
<right type="constant" attribute="5.0"/>
</condition>
</buy>
<buy name="Duchy">
<condition>
<left type="getTotalMoney"/>
<operator type="greaterThan" />
<right type="constant" attribute="30.0"/>
</condition>
</buy>
<buy name="Estate">
<condition>
<left type="gainsNeededToEndGame"/>
<operator type="smallerOrEqualThan" />
<right type="constant" attribute="4.0"/>
</condition>
</buy>
<buy name="Witch">
<condition>
<left type="countCardsInSupply" attribute="Witch"/>
<operator type="greaterThan" />
<right type="constant" attribute="6.0"/>
</condition>
</buy>
<buy name="Duchy">
<condition>
<left type="getTotalMoney"/>
<operator type="greaterThan" />
<right type="constant" attribute="26.0"/>
</condition>
</buy>
<buy name="Duchy">
<condition>
<left type="countCardsInSupply" attribute="Province"/>
<operator type="smallerOrEqualThan" />
<right type="constant" attribute="6.0"/>
</condition>
</buy>
<buy name="Silver"/>
<buy name="Estate">
<condition>
<left type="gainsNeededToEndGame"/>
<operator type="smallerOrEqualThan" />
<right type="constant" attribute="5.0"/>
</condition>
</buy>
<buy name="Copper">
<condition>
<left type="countCardsInSupply" attribute="Curse"/>
<operator type="smallerThan" />
<right type="constant" attribute="1.0"/>
</condition>
</buy>
</player>
<player name="IGG Rush"
author="WanderingWinder"
description="Get all the Ill-Gotten Gains and Duchies to empty 3 piles.">
<type name="UserCreated"/>
<type name="Competitive"/>
<type name="Province"/>
<type name="BigMoney"/>
<type name="Bot"/>
<type name="SingleCard"/>
<type name="TwoPlayer"/>
<buy name="Province"/>
<buy name="Duchy">
<condition>
<left type="countCardsInSupply" attribute="Curse"/>
<operator type="smallerThan" />
<right type="constant" attribute="2.0"/>
</condition>
</buy>
<buy name="Ill_Gotten_Gains"/>
<buy name="Duchy"/>
<buy name="Estate">
<condition>
<left type="gainsNeededToEndGame"/>
<operator type="smallerOrEqualThan" />
<right type="constant" attribute="2.0"/>
</condition>
</buy>
<buy name="Silver"/>
<buy name="Estate">
<condition>
<left type="gainsNeededToEndGame"/>
<operator type="smallerOrEqualThan" />
<right type="constant" attribute="4.0"/>
</condition>
</buy>
<buy name="Copper">
<condition>
<left type="gainsNeededToEndGame"/>
<operator type="smallerOrEqualThan" />
<right type="constant" attribute="4.0"/>
</condition>
</buy>
</player>
I've improved and simplified the IGG bot. It gets a a 57.7/38.7 win-rate vs WW's bot. Some notes first.
I tried deleting the copper-buy-rule and found that it didn't make the bot any worse. Stats (error intervals are with 99% confidence):
Win: 47.4% +/- 0.4%
Loss: 47.1% +/- 0.4%
Tie: 5.4% +/- 0.2%
So it's definitely not worse, and maybe a tiny hair better.
I tried removing the after-silver estate rule, but that made the bot a lot worse. However, moving that estate rule above silver (and deleting the estate rule that was already there and is now redundant) makes the bot significantly better:
Win: 52.7% +/- 0.4%
Loss: 42.8% +/- 0.4%
Tie: 4.5% +/- 0.2%
That's a pretty big difference!
I tried deleting the early-duchy rule, but doing that brings the winrate back down a bit:
Win: 50.4% +/- 0.4%
Loss: 44.9% +/- 0.4%
Tie: 4.7% +/- 0.2%
I tweaked this around a bit and found though that "curse <= 1" performs best, giving a 49.971/45.75 advantage against "curse <= 2".
Finally, I set about tweaking when to start buying estates. Originally this was "#gains <= 4". I found that against this rule, I could get a 51.814/44.415 advantage with "#gains <= 6", and against WW's bot it gets 56.573/39.726, quite good. Unfortunately this causes a slight decrease in performance against BMU, because BMU is going for different piles. So I re-tweaked to "#duchies <= 5" (which should be roughly equivalent in the mirror if early duchies are taken with "curse <= 1"), and this restored performance against BMU and actually does better in the mirror for some reason.
Final bot:
<player name="IGG Rush Final"
author="blueblimp"
description="Get all the Ill-Gotten Gains and Duchies to empty 3 piles.">
<type name="BigMoney"/>
<type name="UserCreated"/>
<type name="SingleCard"/>
<type name="TwoPlayer"/>
<type name="Province"/>
<type name="Bot"/>
<type name="Competitive"/>
<buy name="Province"/>
<buy name="Duchy">
<condition>
<left type="countCardsInSupply" attribute="Curse"/>
<operator type="smallerOrEqualThan" />
<right type="constant" attribute="1.0"/>
</condition>
</buy>
<buy name="Ill_Gotten_Gains"/>
<buy name="Duchy"/>
<buy name="Estate">
<condition>
<left type="countCardsInSupply" attribute="Duchy"/>
<operator type="smallerOrEqualThan" />
<right type="constant" attribute="5.0"/>
</condition>
</buy>
<buy name="Silver"/>
</player>
Performance against WW bot:
Win: 57.7% +/- 0.4%
Loss: 38.7% +/- 0.4%
Tie: 3.6% +/- 0.2%
Performance against BMU:
Win: 95.3% +/- 0.2%
Loss: 4.2% +/- 0.2%
Tie: 0.5% +/- 0.1%
WW bot's performance against BMU, for comparison:
Win: 95.1% +/- 0.2%
Loss: 4.5% +/- 0.2%
Tie: 0.4% +/- 0.1%