View Full Version : the11tablesASH ~I DID NOT MAKE THIS~
ammy55
12-16-2009, 01:24 AM
here is a script for the 11 tables in crimbo town 2009
just a note:
I DID NOT MAKE THIS
it works i'v been using it
it plays the odds
if you want to know how it works look at the code (i have no clue)
it will prompt for a bet amount and a number of turns to spend
EDIT: here is the original link http://ben.bloomroad.com/kol/scripts/crimbo11.ash
props go to RoyalTonberry #1161513 they are awsome
this is the same code but not the same file (i was having some technical difficulty)
EDIT: finally figured it out here's the original
Bazaaretw
12-16-2009, 04:05 AM
Script works great, just used it on a multi, and I um 1727 after 125 adventures.
EaterOfSorrow
12-16-2009, 02:19 PM
Keeps making me loose today...:(
Thank you for posting this! Merry Crimbo -- :dqp-
Edit: FYI - calculated on the wiki that optimal play return is around 35% (4 on an 11 bet), which is about what I'm seeing with this script. Although yes, there can be long stretches where it looks like you're losing.
Also, it would be nice if mafia tracked crimbux losses as well as gains.
Also, you can turn off mana burning in the linked version (at bloomroad.com) and it runs hella faster and presumably will generate less lag while you rip through your turns.
Edit edit: Final percentage was 1232 in 250 adventures ~ 5 cxpa. I think that Bazaaretw's 14 cxpa result might be the result of not noticing that mafia doesn't decrement crimbux on losses (if you average winning 4 on an 11 bet, then mafia thinks that you're making 15 cxpa, I think).
mjn73178
12-16-2009, 02:46 PM
OK, so I'm VERY new at this, and I apologize if this seems a little stupid, but how do I make this work? I've loaded up KOL Mafia, clicked on Scripts up on the top, and then clicked on crimbo11_ash.mht but I keep getting an error message "Unable to invoke from:" I'm sure this is a very basic error, especially since I've never used any scripts with Mafia before, but it's driving me nuts. For the record, I've tried this with version 13.7, and also with the latest daily build which is 7880. Thanks for any help!
1. right click on the linked ash script and "save as" to save it into your scripts folder. It should be an .ash file (plain text), not a .mht file.
2. pick "refresh scripts" off of the menu so mafia knows that you've saved it correctly now.
3. pick crimbo11.ash off of the menu and enter your bet (1-11) and number of turns you want to play
4. profit!
:dqp-
Sputnik1
12-16-2009, 03:47 PM
Actually someone from my clan showed me this version
it looks like it works better too
mjn73178
12-16-2009, 04:13 PM
Thanks DQP, that fixed it! I knew it was something simple.
barnaby36
12-16-2009, 04:27 PM
Bleh, I just wrote up a version similar to the one Sputnik just posted myself, using the tables people have made for the "Optimal 11" thread in the Gameplay Discussion forum.
I think mine's a little more efficient seeing as it doesn't need to sort, but it may look a little more unreadable. Anyway.
Ben
TamGarTrinKi
12-16-2009, 05:48 PM
Ok, Added a couple of things to the Tonberry version.
It used to announce a 'push' as a Win, now it says push/win/lose respectively. And after your adventures are done will give you a summary of wins/losses/pushes and a total Crimbux earnings (profit).
jameZ
12-16-2009, 06:08 PM
Ok, Added a couple of things to the Tonberry version.
It used to announce a 'push' as a Win, now it says push/win/lose respectively. And after your adventures are done will give you a summary of wins/losses/pushes and a total Crimbux earnings (profit).
I keep getting this on version 13.7 Expected }, found || (RTCrimbo11.ash, line 291)
hideouspenguinboy
12-16-2009, 06:37 PM
remove the ) at the end of line 290 and it will work . . .
greenrider
12-16-2009, 07:52 PM
Ran 348 adventures with the latest script posted here - 3.08 crimbux/adv.
I think people on the boards were speculating that 11 should be worth about 4/adv, so perhaps there are some unoptimal things the script is doing? Or just bad RNG, perhaps.
Spiny
12-16-2009, 08:13 PM
The script has had varied results when used by those in my household. One friend reports 16 crimbux/adv today, but I've heard 2 or 3 crimbux/adv from my other friend yesterday. I am still playing the 11 tables manually as I find it engrossing lol.
icon315
12-16-2009, 10:07 PM
OK i tested each script and the one that got me the most wins (out of 10 turns) is table11ASH.ash......Also How do you edit a script? I can't seem to open them using note pad
greenrider
12-16-2009, 10:10 PM
OK i tested each script and the one that got me the most wins (out of 10 turns) is table11ASH.ash......Also How do you edit a script? I can't seem to open them using note pad
You are going to base an analysis of a script that plays a blackjack game on a sample size of 10?
icon315
12-16-2009, 10:16 PM
Reallly i just want to know how to edit a script
Edit: Never mind figured it out.....well that was easy
Further Observation.....The RTCrimbo11.ash made me loose like 6 times in a row
Round 130 (counting down) ... Betting 11
Hand: 4 4 ---- num cards: 2 ---- sum=8 ----- soft? false ---- dealer shows 4
I have: 13
You Lose!
Round 129 (counting down) ... Betting 11
Hand: 5 5 ---- num cards: 2 ---- sum=10 ----- soft? false ---- dealer shows k
I have: 10
You Lose!
Round 128 (counting down) ... Betting 11
Hand: 3 k ---- num cards: 2 ---- sum=8 ----- soft? false ---- dealer shows k
I have: 13
You Lose!
Round 127 (counting down) ... Betting 11
Hand: 2 3 ---- num cards: 2 ---- sum=5 ----- soft? false ---- dealer shows a
Hand: 2 3 4 ---- num cards: 3 ---- sum=9 ----- soft? false ---- dealer shows a
I have: 9
You Lose!
Round 126 (counting down) ... Betting 11
Hand: 4 k ---- num cards: 2 ---- sum=9 ----- soft? false ---- dealer shows k
I have: 14
You Lose!
Round 125 (counting down) ... Betting 11
Hand: 4 4 ---- num cards: 2 ---- sum=8 ----- soft? false ---- dealer shows 4
I have: 13
You Lose!
lostcalpolydude
12-16-2009, 10:39 PM
The RTCrimbo11.ash made me loose like 6 times in a row
You mean the RNG made you lose 6 times in a row. The script made the right decision every time there.
icon315
12-16-2009, 10:48 PM
Wins: 52
Losses: 55
Pushes: 14
Grand Total: 484
Grotfang
12-17-2009, 12:12 AM
Seems reasonable to me.
52 + 55 + 14 = 121 adventures.
484 / 121 = 4 crimbux per adv exactly. Not bad returns :)
TamGarTrinKi
12-17-2009, 12:36 AM
I keep getting this on version 13.7 Expected }, found || (RTCrimbo11.ash, line 291)
Ah, sorry. While I was writing the little summaries the original got updated due to some of the numbers being out, so that must of been when I put in the new special cases. (I was out of adventures by then)
Anyways, fixed, plus added an average output at the end also.
Bazaaretw
12-17-2009, 06:40 AM
Gambling complete
Wins: 68
Losses: 56
Pushes: 21
Grand Total: 902(6.0/adv)
Bazaaretw
12-17-2009, 07:04 AM
Gambling complete
Wins: 81
Losses: 60
Pushes: 29
Grand Total: 1111(6.0/adv)
lostcalpolydude
12-17-2009, 07:19 AM
Based on those numbers (the 6.0 when it should be 6.2 or whatever) the script is using an int instead of a float somewhere.
BTW, the script has a small bug that floors the average Crimbux yield to an integer. (That's why 1111/170 = 6.0) I'd prefer to round it off to 2 decimal places. That line should be...
avg = round(total/ to_float(winbets+losebets+pushbets) * 100)/100.0;
I also see no need for a the possibility of betting anything other than 11 Crimbux. I also like to be able to call Crimbo11 -40 and have it burn all except 40 turns. Yeah, I'm picky that way. Here's my personal copy.
SoItBegins2
12-17-2009, 08:30 AM
OK, after seeing the start of this thread, I took the script and upgraded it. When I saw people had updated it do print statistics, I added that, too. In the process, I've ended up darn near rewriting the thing.
Basically, my script does everything that the current script (the previous post) does, with a few changes:
1. A few bugs have been fixed. The script will not double down (thus avoiding a hang) if you don't have the Crimbux to do so. Also, in the event you get only one Crimbuck back from a game (through getting a push on a 1-Crimbuck game), the script won't crash.
2. You can choose to auto-skim Crimbucks into your closet as you win... or from it as you keep losing. Or both.
3. The card display now enumerates which cards you have, and tells you what both you and the dealer ended up with at the end of the round.
I hope you enjoy it!
EDIT: Whoopsie. Typos fixed now.
TamGarTrinKi
12-17-2009, 11:48 AM
...1. A few bugs have been fixed. The script will not double down (thus avoiding a hang) if you don't have the Crimbux to do so. Also, in the event you get only one Crimbuck back from a game (through getting a push on a 1-Crimbuck game), the script won't crash...
Crashing on 1? ... Can't see how that happens.
Also, I really should of noticed that int division not working earlier myself.
mredge73
12-17-2009, 02:42 PM
I must be terribly unlucky, I only get 3 crimbux per adv.
Anyway, Great Script!
Zaranthos
12-17-2009, 03:05 PM
There has to be a defect. Can't you add a disco face stab RNG? ;-)
Gambling Complete!
Wins: 38 (10 natural 11s)
Losses: 50
Pushes: 12
Total Profit: 187 Crimbux
Average Profit: 1.87 Crimbux/Adventure
datavortex
12-17-2009, 04:31 PM
OK, after seeing the start of this thread, I took the script and upgraded it. When I saw people had updated it do print statistics, I added that, too. In the process, I've ended up darn near rewriting the thing.
Does this version of the script implement empty inferences' map of plays, or was it branched from the RoyalTonberry version prior to that update (http://forums.kingdomofloathing.com:8080/vb/showpost.php?p=3524392&postcount=91)? Assert mtfns == empty inferences?
Thanks.
SoItBegins2
12-17-2009, 04:49 PM
Crashing on 1? ... Can't see how that happens.
It's because the acquire message for 1 Crimbuck ("You acquire an item: Crimbuck") is different than for many ("You acquire ~~ Crimbucks"). My version works by reading how much you've gained-- I only discovered it by accident while I was testing with 1 Crimbuck bets (so if the script fouled up, things wouldn't go too wrong).
Does this version of the script implement empty inferences' map of plays, or was it branched from the RoyalTonberry version prior to that update? Assert mtfns == empty inferences?
This version does implement the optimal table displayed on the wiki, but it's hard-coded as opposed to being handled through if trees-- I basically branched off what I've got now from the version barnaby36 did (http://kolmafia.us/showpost.php?p=21319&postcount=10), on the first page of the current topic.
rukheotw
12-17-2009, 05:33 PM
Here are some stats for you
Wins: 222 (59 natural 11s)
Losses: 196
Pushes: 92
Total Profit: 2365 Crimbux
Average Profit: 4.64 Crimbux/Adventure
Wins: 228 (58 natural 11s)
Losses: 208
Pushes: 104
Total Profit: 2233 Crimbux
Average Profit: 4.14 Crimbux/Adventure
Good luck everyone!
oly0015
12-17-2009, 06:55 PM
Not so well today as yesterday...
Wins: 35
Losses: 41
Pushes: 16
You won a total of 264 Crimbux. (2.87/adv)
lorddave
12-17-2009, 09:04 PM
I think I found a problem that's appearing in most or all of the scripts that are using nested if statements.
They appear to be matching on a 5 in the user's hand, but ignoring a k. For example, with a sum of 9 and the dealer showing a 5, it'll stand on "a 3 5" but default to hit on "a 3 k".
Apologies if I missed something obvious here.
datavortex
12-17-2009, 10:54 PM
This version does implement the optimal table displayed on the wiki, but it's hard-coded as opposed to being handled through if trees
Awesome. Thank you!
shoptroll
12-18-2009, 12:24 AM
Excellent updates. Thanks for improving this script :)
DoctorRotelle
12-18-2009, 01:42 AM
I've added a couple goodies to your script:
It can recognize a push in my version. It will print the Push message in purple.
I moved the "burn *" to the top and made it a variable, and added an example showing you can use scripts instead of the command. Both are just strings fed to the cli_execute at the bottom.
Enjoy!
-=DoctorRotelle
Edit: I really like RT's script better. Seems to win more!! I've made similar adjustments to make all the variables easily configurable at the top.
Hardcoded the bet to 11. The variable is at the top of the script for easy adjustment.
Added a "debug" routine so you can see which actions are being taken at the card table. You can turn it off with the debug variable (also at the top of the script).
Fixed the average values in the summary at the end of the script. Truncating the number to 3 decimal places, max.
Included Bale's code to make negative and * values function for adv to spend.
My Current version is 1.05DR
That FN Ninja
12-18-2009, 04:53 AM
When I looked at DR's post all I saw was "crimbo11 - 11 KB - 11 views". I've been playing so much 11's that all I see is 11's. I see them everywhere. It's ridiculous. It's not even funny!
Chalky
12-18-2009, 08:02 AM
OK, after seeing the start of this thread, I took the script and upgraded it. When I saw people had updated it do print statistics, I added that, too. In the process, I've ended up darn near rewriting the thing.
Basically, my script does everything that the current script (the previous post) does, with a few changes:
1. A few bugs have been fixed. The script will not double down (thus avoiding a hang) if you don't have the Crimbux to do so. Also, in the event you get only one Crimbuck back from a game (through getting a push on a 1-Crimbuck game), the script won't crash.
2. You can choose to auto-skim Crimbucks into your closet as you win... or from it as you keep losing. Or both.
3. The card display now enumerates which cards you have, and tells you what both you and the dealer ended up with at the end of the round.
I hope you enjoy it!
EDIT: Whoopsie. Typos fixed now.
I've used this script several times now, but all of a sudden I'm getting:
Bad item value: "Crimbuck" (Crimbo11.ash, line 252)
What's up with that?
*edit* humz, updated mafia build and now it works. Oh well
SoItBegins2
12-18-2009, 10:23 AM
More statistics. I have 4 accounts-- here's my totals for each.
Gambling Complete!
Wins: 56 (15 natural 11s)
Losses: 41
Pushes: 24
Total Profit: 682 Crimbux
Average Profit: 5.64 Crimbux/Adventure
Congratulations - Happy Crimbo!
Gambling Complete!
Wins: 50 (12 natural 11s)
Losses: 39
Pushes: 23
Total Profit: 550 Crimbux
Average Profit: 4.91 Crimbux/Adventure
Congratulations - Happy Crimbo!
Gambling Complete!
Wins: 38 (11 natural 11s)
Losses: 29
Pushes: 7
Total Profit: 462 Crimbux
Average Profit: 6.24 Crimbux/Adventure
Congratulations - Happy Crimbo!
And:
You've run out of Crimbux.
Gambling Complete!
Wins: 3 (0 natural 11s)
Losses: 8
Pushes: 1
Net Loss: -55 Crimbux
Average Loss: -4.58 Crimbux/Adventure
Oh well. Happy Crimbo!
...but then...
Gambling Complete!
Wins: 56 (15 natural 11s)
Losses: 62
Pushes: 23
Total Profit: 473 Crimbux
Average Profit: 3.35 Crimbux/Adventure
Congratulations - Happy Crimbo!
TamGarTrinKi
12-18-2009, 11:01 AM
It's because the acquire message for 1 Crimbuck ("You acquire an item: Crimbuck") is different than for many ("You acquire ~~ Crimbucks"). My version works by reading how much you've gained-- I only discovered it by accid
Ah, so it wouldn't crash because it said "1", it would crash because it didn't. :)
Spiny
12-18-2009, 09:25 PM
There's a small problem with both Bale's version and Doctor Rotelle's version of the script in the math as far as when winning from doubling down. This probably affects the other versions of the script as well. You need to account for the doubled bet in the win as well as in the loss situation.
Ethelred
12-18-2009, 10:42 PM
I also see a problem with the results printed out by Dr. Rotelle's version. Haven't tried to track it down yet. My debug fu is very weak. The result total is sometimes, but not always, off a little bit. This, of course, also results in the average being off. The double down theory above seems like a good candidate. I'll look into that after rollover when I can get my next 11 fix, er, I mean run some more turns.
Dractyl
12-19-2009, 01:41 AM
Just to add it to the list in this thread, I have a version not related to any of the others here (http://kolmafia.us/showthread.php?t=3127) (look for v2 just down the page).
It started with the original crimbo11.ash, but there are only like 6 lines left from the original. It implements "empty inferences" work as a lookup table and uses that rather than a decision tree. You should find it pretty clear and easy to read/modify.
Dractyl
SoItBegins2
12-19-2009, 08:45 AM
Huh. Today, I made miniscule profits on my first two accounts, and great profits on my last two. You might want to check your results re/ the RNG.
Dractyl
12-19-2009, 09:44 AM
Huh. Today, I made miniscule profits on my first two accounts, and great profits on my last two. You might want to check your results re/ the RNG.
I get the feeling the RNG is not entirely random. Has anyone else noticed that 11s tend to arrive in bunches. If it were properly random, or based on a simulated deck, that would happen waaaaay less frequently than it does. I'd be willing to put down a couple of crimbucks that if I were to plot winnings over rounds I'd see myself generally holding even with spikes of profitability.
Also, with regards to profits, I can't help but notice that my alt who did not raise any meat now has almost as many crimbux as my characters who did. I wonder if there is an additional function that skews the payouts based on how many crimbucks you already have. If I were putting the whole thing together I might do that because I want everyone (even people who come late), to have a fun Crimbo. I'll try playing with a character with no crimbux and see what happens.
(Time passes)
Here is a run with a brand new character who did the first Don Crimbo task to get some seed money:
You have won 605 delicious crimbux over 99 rounds (6.11 per adv.)
--- Final statistics ---
Rounds: 99
Rounds Won: 47 (47.47%)
- by natural 11: 14 (14.14%)
- by double down: 6 (6.06%)
Rounds Lost: 37 (37.37%)
- by double down: 3 (3.03%)
Rounds Drawn: 15 (15.15%)
- by double down: 2 (2.02%)
Starting Crimbux: 320
Crimbux won: 605
Ending Crimbux: 925
That's better than I've been getting recently with my "rich" characters. It's a sample of one though, so it's not meaningful yet.
Dractyl
linguinelad
12-20-2009, 08:32 PM
Why is it my scripts aren't available (like the one in this thread) when I use the daily build? I'm able to access my 11tables script in mafia 13.7
how do I fix it?
monster hunter
12-29-2009, 01:21 AM
crimbo11.ash works very well. After using 263 adventures, this script made me 1,287 crimbucks, which is an average of almost 5 crimbucks per adventure. At an average, while hunting penguins, I'd make at least 2630 crimbucks when spending these many adventures. But, of course, using the script if more efficient BECAUSE you can't spend 263 adventures in the Don's Crimbo Compound, and eventually, you can't even adventure in the Compound at all.
What would we do without scripts to make our artificial wealth?
tOaDeR
12-30-2009, 04:22 PM
i used DoctorRotelle's script for this
first 100 rounds
Gambling complete
Wins: 45
Losses: 37
Pushes: 18
Grand Total: 484 (4.84/adv)
second 100 rounds
Gambling complete
Wins: 50
Losses: 32
Pushes: 18
Grand Total: 814 (8.14/adv)
third 100 rounds
Gambling complete
Wins: 38
Losses: 49
Pushes: 13
Grand Total: 495 (4.95/adv)
fourth 100 rounds
Gambling complete
Wins: 37
Losses: 46
Pushes: 17
Grand Total: 231 (2.31/adv)
fifth 100 rounds
Gambling complete
Wins: 36
Losses: 46
Pushes: 18
Grand Total: 264 (2.64/adv)
last 67 rounds
Gambling complete
Wins: 25
Losses: 36
Pushes: 6
Grand Total: 110 (1.641/adv)
i started with 100 Crimbux and ended up with 2,267
thanks to all contributors on this script. i just wish i had known about it sooner :/
monster hunter
12-31-2009, 04:07 AM
NEED HELP
It's the last day of crimbo, and this shows up...
[18914] Crimbo 11 Table
You bet 11 Crimbux
No match attempted or previous match failed (crimbo11.ash, line 30)
I don't understand what's going on. This never happened before today.
ammy55
01-01-2010, 06:21 AM
EDIT: @bale ok i see your point
It may not be very useful, but why should it be locked? Someone might want to comment on it as a programming challenge someday and want to understand it better.
eitak
01-02-2010, 12:04 AM
Why is it my scripts aren't available (like the one in this thread) when I use the daily build? I'm able to access my 11tables script in mafia 13.7
how do I fix it?
I'm late on answering this, so you probably figured it out already, but you can click "Refresh Menu" under the "Scripts" menu to make it show up if it doesn't.
Powered by vBulletin® Version 4.1.12 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.