#Balatro Calculator
889 messages · Page 1 of 1 (latest)
I've been working on a Balatro Calculator where you can go to the webpage, put in any hand + jokers, and it'll calculate the score.
It also optionally will look for the optimal order for the cards/jokers to maximize the score.
Please let me know (either here or via DM) about:
- questions about the calculator
- bugs you find with it / incorrect calculation
- changes / additions you'd like to see with it
I would love the addition of the plasma deck
I haven't played with the Plasma deck yet, nor do I think I have unlocked it, but I'll look into adding a toggle for it.
I just looked into it; should be easy to add.
That would be nice since going into high score endless runs with plasma is so much easier
Also I think @junior cairn would be great here with his knowledge of the game, if anyone could spot something wrong it would be him
And while I know negative jokers don't have any effect on score calculations besides the base joker effect I think visually it would be nice if you could fully match the joker setup you have
Also some edge cases I noticed here that need to be added: first of all a money score for bull/bootstraps and planet cards for observatory voucher giving 1.5x per planet card
Also decaying and scaling jokers like popcorn/ice cream or square joker
And ceremonial dagger
Sorry for the incoming spam of messages but I'll try to spot all the jokers with changing values I can see
Well you know what I won't spam but instead just try and find all the jokers with values that can change
This is pretty neat
The optimizer doesn't seem to move cardd sharp if its not active (I also am not sure how to activate it)
I was mostly messing around but here
where it would be optmial to have the normal joker before card sharp
ye, litteraly just about to put the same thing
I think it's live and working.
The value UI controls the state for all the jokers on the right, so change the value to 1 by clicking + and then click the joker.
not an error, but...
fixed, thanks.
wanted to try the WR strat on this calculator, but Baron is calculated based on played kings, not held in hand
calculator also appears to crash when the numbers get too big
when I try to place the second RPG 2 of hearts it bugs out
oh I see
also a joker search would be nice (even like a jokers.filter(j => j.name.toLowerCase().includes(search.toLowerCase())) would be nice)
The bug was a bit different than that. Should be fixed. (wait a minute and refresh the page)
Fixed
Thanks, those should all be fixed now.
Added.
It checks both the name and description of cards.
For the joker "Crafty Joker" nothing happens. When I open the console, I got :
Aparently I typoed "Flush" as "FLush". That's it.
Should be fixed now.
When I reload the page, I obtain the same error.
It could be cached
refresh again.
CTRL+SHIFT+R to hard-refresh (in chrome at least) but normal refresh should be enough.
Yes, that works. Thanks 🙂 ❤️
You probably just refreshed before it was actually live; it takes a minute for Jekyll to update things.
Two suggestions: Add text saying what the played hand is (ex: full house), and being able to edit jokers you already added by clicking on them (to add an edition or change the value).
It's really nice though!
Yeah, I can do both of those.
I added the name of played hand, I'll hold off on the "editing jokers when clicked" since it's a little more complicated.
also i think some of the scaling is wrong, a level 2 straight is 60x6 and not 50x7
Jokers don't have negative values anymore
Also unless it got changed, this is incorrect
Holo and foil trigger before joker effect (if it wasn't changed)
Polychrome after joker effect
Does not apply to playing cards
This is what I believe the complete order for stuff to trigger (but I'm not 100% sure about editions and seals order, does not usually matter tho)
#1202386969867595827 message
Thanks. I was pretty sure I had some order-of-operations wrong since I did it just by memory, and was going to look into it this evening.
I applied the changes you said, let me know if you find any more that are wrong. I only just implemented the breakdown screen last night.
Also the planet scaling is wrong
I said it in the chat before but idk if it was fixed
The scaling I used came from the source code, I guess I got it from the wrong spot?
I mean all I know is that I had a level 2 straight as 50x7 while it's 60x6
I remember someone posted an image
Okay, I just updated it to be in line with https://balatro.wiki/en/Planet-Cards
I'll try to make a list of things that need to be added since they can add score when I get back home
Like observatory voucher is the simplest example
Pair that up with perkeo and you can make use of that
i suggest that when Plasma Deck is enabled show the “balanced” values as well
It shows it in the breakdown
ooh i see
Very impressive!
added
very nice
another suggestion i have is being able to change the value to a specified value, not only being able to up it by one
and maybe being able to change per joker
Yeah, those are both on my TODO list, lower priority since they are QoL rather than functionality.
yeah aight if its on the list ill move on
also idk if it really matters but like i thought about swashbuckler and liquidation, since it makes jokers buy price lower it also makes their sell value lower so its also a nerf
swashbuckler with value changing jokers is the basic category
like swashbuckler and egg or gift card
Right now, Swashbuckler doesn't automatically calculate its mult, but it'd probably be nice if it did.
wait i guess you can just input the final value into the site
not really a problem but rather something players will have to keep track of
also misprint, it shows the range on the card but doesnt show the range of possible score like how lucky cards do
same with copying it
Could you give an example?
It's possible you encountered a different bug which caused it to break (there would be an error in the console)
and refreshing would fix it.
added (also for planets, though not hands because of the "lvl." part of the text. Should I just remove the "lvl." and make it text-editable? and hands)
you can make the “lvl.” part show up after input
like when inputting you only see the numeric value
I think I know a way I could make that work.
it’s definitely possible but im not expert in coding field so
there
nice
i may have missed it, but if the function doesn't exist then support for negative jokers would be nice. matters for stencil and swash at least
Speaking of Swash you could also have a way to edit the sell value
Both of those, you put the multiplier in for manually.
Stencil, it's easy to just do yourself. Swashbuckler, less so (since it depends on joker order), I'll add negative jokers if I automate his multiplier.
What would be the order of operations here?
Uhh idk
If you have Steamodded then Debug Mode is a great way to set it up in-game https://discord.com/channels/1116389027176787968/1209857245316255744
I do not
makes sense
How do you give enhancements or stamps (namely steel & red seal) to cards in the debug mode?
Okay, it goes:
- cards played (left to right)
- cards held (left to right)
- steel (can repeat)
- shoot the moon (can repeat)
- red seal (repeats others; can not repeat)
- mime (repeats others; can not repeat)
- jokers (left to right)
Shoot the moon applying before steel is kinda sad
so, another tricky thing: shoot the moon executes before the xmult does visually, but in the code it happens second. there may be inconsistencies
im not sure if it makes score display incorrectly or what
(to verify, check the order h_mult and h_x_mult execute in eval_card and card_eval_status_text in common_events)
Here?
if context.cardarea == G.hand then
local h_mult = card:get_chip_h_mult()
if h_mult > 0 then
ret.h_mult = h_mult
end
local h_x_mult = card:get_chip_h_x_mult()
if h_x_mult > 0 then
ret.x_mult = h_x_mult
end
local jokers = card:calculate_joker(context)
if jokers then
ret.jokers = jokers
end
end
yeah, mult seems to be added first? but it definitely displays afterward
i ended up checking yesterday after i had a steel queen/shoot the moon run
I just went through frame by frame, and cross referenced with new code in my calculator, and it's definitely calculating it with shoot the moon first.
The final round score is consistant with that.
isn't this what I already sent with my message above 😭
I was 100% sure about that one - that's exactly how it happens for played cards, so I don't see why would it be different for held in hand stuff
the only thing I am not 100% sure are seals, but that shouldnt matter
It was helpful to work through it and re-figure it out myself.
Another suggestion I have is to the actual hand in observatory
As apposed to the planet names?
I felt like planet names made it more clear what the numbers are for.
You can have both
How would you suggest having both?
Saturn (Straight) for example
That looks clunky to me though
I guess this is acceptable.
Low-ace straights, four-card straights & flushes, and 4-card straight flushes weren't implemented correctly before, but now they should be:
I wonder if anyone here knows rust or any fast coding language to make the site into a fast application, that way maybe the optimization part could be done faster and not slow down your browser to a crawl when dealing with really high scores
It's just js isn't a fast enough language I think for all the calculations people might wanna do
I could multi-thread it, which would be maybe a 10x speed boost (and would get around blocking the UI), but language isn't really going to matter much when the time complexity is O(n!).
Algorithmic improvements are far more important.
As an example of an algorithmic optimization I'd like to implement, right now, when optimizing Joker order, it tries every possible ordering, but that could be minimized a lot given that the order of many jokers doesn't matter outside of some edge cases where another joker's position relative to it matters. In many cases, just putting x_mult jokers on the right is the only thing to optimize, and that can be optimized easily via sorting them like that.
Well good to know it isn't language related problems
another suggestion i have is to show the effect you have on a joker while hovering
and on the cards
Baseball should be working correctly now.
found a bug with the boots
i put in a 53 for it to simulate the +106 someone got with their hand, but looking at the breakdown it seems to be giving +108 for some reason
I was adding 2 for some reason. Should be fixed now.
👍
I'm just popping in here to say thank you for this <3
The calculator is really useful <3
Editing jokers when clicking on them is finally implemented.
This should be a significant QoL improvement.
This also means that clicking jokers no longer removes them. Instead, on hover, you get a red tab which, when clicked, removes the joker.
The next things I'm planning to implement are:
- modifier tooltips
- boss blinds
- The Flint
- disabled joker modifier (Crimson Heart)
- force card to be played (Cerulean Bell)
- disallow hand types (The Mouth/They Eye or when building for Supernova)
a possible suggestion from the high score nerd in me: to add the score you would get even if you went past infinity. idk how hard that would be on the system to keep the score written down when already dealing with such higher numbers but if its not something that effects performance that would be nice
I think JS supports big integers natively so it might not be that hard to do
well lets hope
It's on my todo list already, but I can't imagine it wouldn't effect performance.
epic
cant imagine it wouldnt meaning it would?
Yes
big rip
It don't know by how much, and it could be a toggle/falback-only.
i mean a toggle would probably be good
theres no need for it for 99% of cases
only in extreme cases
@dark pier made a PR to fix a bug :)
Thanks. Merged.
Just a silly little typo squashed
Will definitely try breaking it some more
Please do try to break it more.
random thing i noticed: while i dont think it matters too much popcorn and ice cream overflow into negative numbers when the value number is above their actual lifespan
Yeah. I know. It's not something I've bothered fixing just because it's such a minor oversight, but it'd be nice if it just bottomed out at 0 or something elegant like that.
yeah it aint too serious so makes sense
I think the balatro wiki isn't up to date since I just noticed flush 5 isn't scaling properly, level 9 is 480x40 not 430x38
@junior cairn can you just find the scaling from the game code in an easy way to paste?
You can figure it out pretty easily with the debug mode
(weird choice of place to ask, but makes sense besides that)
Why would it be weird, the main use of a table like that is in a calculator site if anything
I think all of these are correct (except maybe flush 5, flush house, or five of a kind):
I don't think I tested flush 5, flush house, or five of a kind, but I'm pretty sure I did for the rest
Not on my PC either atm
And won’t be for a bit
Rip
can you add some sort of "reset" button? i usually only use it on bosses, so by the time i want to use it again, im already in completely different setup and clicking on everything is no ideal
also, how am i supposed to setup ramen? figured out, but im not sure if doing it by number of discards is better or no
walkie talkie?
another suggestion - add some way to compare the jokers, i want to test whether scholar or fib would be better (assuming perfect hand), but rn there is no fast way to check it. either "disable" joker, or some way to weight pair of jokers
*fib doesnt work aswell
I'm already in the process of adding two features right this second that would help with that:
- disable joker (lmao, already done, just not published)
- URL parameter of hand (so you could quickly just open a second tab pre-loaded to be the same)
As for resetting, you can just refresh the page to reset everything.
Does this add a draw chance for specific cards?
Like % chance to draw 9 of clubs, or % chance to draw any club or any 9
No. This calculator only considers what you currently have in your hand; not what you have in your deck.
If you want the chance to draw a specific card/set of cards, you need to look at the cards remaining in your deck, how many cards would satisfy what you want, and how many cards you're going to draw.
I could probably make a different calculator which, given a deck-state and hand-state could tell you the odds of drawing various types of hands with various discards, but it'd be a very different kind of thing.
I just am bit probability nerd, so i do that calculation in my head all day, but it does get tedious doing it every draw
As a general rule of thumb; just count how many cards would satisfy what you want (if you're looking for a single card) and divide that number by the number of cards remaining in your deck. That's your A in B chance of drawing it. You do A / B to get the % chance of drawing the card. If you're looking for multiple cards, a rough approximation is to do that same thing for both types of cards and multiply the odds; e.g. 10% x 20% = 2%. Keep in mind that if there's overlap, e.g. you're looking for 2 Aces, you can't draw the same card twice so subtract 1 from the second count.
Oh, then that's probably redundant information for you...
useful info nontheless
even if not for me
i even attempt to do game wide ones in my head
like if i add any card to my hand what boost that does to my deck in the long run ect
I personally do that part almost all by intuition. I don't bother doing much more than checking how many cards there are to satisfy a certain hand.
The URL now updates with a query parameter that contains the information of the current hand setup, which can be copied into a new tab to create the same setup or shared with others for a faster exchange of ideas. (other improvements too, like disabling jokers, and the Flint)
https://efhiii.github.io/balatro-calculator/?hand=oADxiuW4AhD0QQAYAgADjPRdCAEgFg
Calculate the best score for any Balatro hand
I did what I could to try and make it so that the URL doesn't get too long.
walkie talkie should be fixed as well.
have you been working with the game itself with this or just seperately with a web app?
im currently trying to modify the tooltip to show a chance %
I have looked at the game's code a little, but haven't messed with it besides using the debug mod.
ive been studying the code for the last few hours trying to work out where/how i would mess with the tooltips
flush five base score is 160x16 and the planet gives +40 chips and +3 mult
I made it so that for Raised Fist, it puts the lowest cards on the left (with preference for red stamps & red stamps with steel being on the right so that they trigger twice) so that Raised Fist triggers first, and it doesn't do so if you don't have raised fist so that Shoot the Moon can gets maximum effect from steel cards:
P.S. Raised Fist triggers (as far as I can tell) the right-most of the cards of the lowest value.
btw, I was already putting queens on the left of kings and aces for Shoot the Moon.
Wait, I just realized that the one with Raised Fist disabled gets a higher score... I guess the two steel 4s getting to activate after Shoot the Moon is more valuable in that case than Raised Fist triggering before the other 3 steel cards. 😞
I think it'd be ideal if I did it the other way around; doing queens on the left, then low card(s), then the rest.
brb
godspeed edward, thank you for this wonderful creation
My goodness, @dark pier. This is absolutely incredible!
Just a PSA that in the event of random events, the optimizer might not choose the actual best option; it'll choose the option with the highest worst-case, but the highest average case might be something else:
https://efhiii.github.io/balatro-calculator/?hand=oACMOJQACOMAECgAKag1BKA0BIA
This also made me notice a slight mistake with Sock and Buskin triggering too early
Tbh the average isn't a great metric either, is it ?
A median would be a better indicator since it wouldn't be skewed by higher scores
Tho it wouldn't be nice to compute especially for all the combinations
When I said average, what I was thinking was really EV (expected value) which is basically the same thing as the mean weighted by how probable an outcome is.
The median would be the thing you want to optimize for a single hand, but the mean (EV) is what you'd want to optimize for many hands. For something in-between (the 3-6 hands you generally have), the actual thing to optimize is probably somewhere in-between 🤔.
maybe counting the random events averaging it?
Oops! All 6s is annoying to have to consider. (especially since it's blueprint compatible)
true
Mhhh i mean to be fair I guess both indicators should be available
For labeling them; does it make sense to call them: Long-term EV and Short-term EV for mean and median respectively? I imagine most people don't know or remember the difference between mean and median.
I think that's rather good names 👌
I tested today with brainstorm and it wasn't compatible
Now I have to change things from having 1 optimizer (minimax) to having 4 (minimax, meanmax, medianmax, and maximax)
Wait what why is it blueprint compatible
People claimed it was in the discord, maybe they just assumed without testing?
Pretty sure that's outside the effects blueprint would affect
I'll test blueprint but I'm certain brainstorm
Well i hope its not too complex, i would try to help next week since I'll be on vacation
👍
It'd be weird if it was the only card that is blueprint compatible and not brainstorm compatible
There's also, IIRC, situations where you want the minimum payout, so a minimum variation of those might also be desirable in niche cases;
(minimin, meanmin, medianmin, and maximin)
ooh maybe I could make a thing on my save loader to make a url for the current save state
That'd be epic, I can describe to you how it works; it's a bit complex because I wanted the URLs to be as short as possible.
I'm reading the comment and it seems to make sense
also my thing is also in js so I coild probaly just yoink the js file and use your code
I guess I need to see how jokers are formatted
Each joker is indexed by x and y coordinate in the spritesheet image, joker value is what determines state and you can see that value in the web-app
I had forgotten that I actually commented that bit; most of my code is pretty lacking in the comments department. 🙈
Yeah I feel that
Looks like I'll have to make some id map, but that shouldn't be too bad
and then I'll have to convert how things are storing their value
a few values seem like they might be a bit difficult
like card sharp
The value for Card sharp is just a boolean; you can probably just default it to false until/unless you want to actually check for if it's enabled.
well the issue is I don't know what hand will be played
so I can't know if it should be enabled
and neither do I. it's one of a few cards that's not implemented properly due to missing information.
yeah
the user being able to toggle it without readding it would be nice
oh wait did you add that?
oh you did
I missed that
in that case its not a big deal
the user can do that
Swashbuckler and Obelisk are the other two that aren't really implemented correctly
yeah swashbuckler would be nice
if you implement sell value, the save reader could export that as well
same with plays on each hand
I did not because Gift card is horrible
I mean iirc the discount voucher can even change sell values
and modifiers
its annoying
but it might be nice to be able to add it in the edit/add menu
just for when using swashbucler
side not it might be smart to add a version field to your binary format
so you can add stuff to it without breaking loading older url's
Yeah, I strongly considered that; for now, I'll just change it to a different query parameter name if I have to make a breaking change.
yeah fair enough
but yeah you could keep backwards compat with an version field, just don't do the new stuff when parsing
otherwise, looking good
I guess you can still append data to the end of the format now
ok I will see if I can make a quick proof of concept for this
Okay, I guess blueprint isn't compatible (maybe it used to be?) but you can have multiple Opps! All 6s and they stack.
Yeah I know they stack but they can't be copied
news to me
just want to confirm, number of cards is cards held - cards selected , and number of cards in hand is cards selected, right?
also seems a bit odd you push the size of the hand then the size of the seleected but then you push the selected first and the hand second
I just did some back-of-the-napkin math and, to find the median of this would require checking 2^26 = 67,108,864 possible outcomes. For context, calculating 40,000 takes over a second, lets call it 1 second, so that'd be roughly 27 minutes per hand-calculation plus the optimizer does upward of a few hundred hand-calculations per hand when one optimizer is enabled and upward of tens of thousands when both are enabled.
TLDR; I don't think we're getting a mean/median optimizer.
Let's first start with performance before we start calculating random effects
Like I ain't trying to rush or anything but imo it would be better to work on multithreading for example
Rather than the median of lucky card or something
Fine, I'll do the boring thing and implement multithreading
grumble grumble programmer grumble
good news
I think cards should work too, but I wasn't in the right state to check
right now any custom values aren't implemented
I like that you have 1 foil card mixed in in the middle
yeah I was just buying things in the shop
is nice it worked though
I will mess with it a bit more later
theres still a few todos
yeah cards seem to work
I mean it might be boring but I think most users who will actually want to get a score calculation will want the extra performance needed to get scores for high score runs
I've found that the performance right now is more than good enough so long as you aren't trying to optimize both hand and jokers at the same time, but I said I'll work on it, I know how to do it, I'll work on it.
I mean it definitely tanks when I try calculating near inf scores
And I know that's the extreme but I think that's a use case that will be used more than you think
send me a link
I mean I don't have links but it's easy to make
Just like 4 barons and 4 mimes and a bunch of red steel kings
with that strategy, if you're trying to "optimize" the cards, you're looking at over a billion different hands (which are all one of 6 hands btw so really redundant) so of course it's slow; multithreading won't help in that case. What would help, though, is pruning duplicate hands from the calculation.
I mean I think performance optimization in general should be put first
Instead of such niche cases
I ain't a dev so I ain't gonna judge on the pace but it's just my 2 cents
In general, multithreading is going to get you like one or two more cards. algorithmic improvements are going to either be unhelpful because the improvement isn't universal or orders of magnitude faster.
They're both worth doing.
it doesn't correctly count the midas mask + vampire + pareidolia combo
It doesn't take into account gold enhancements in general. I didn't think about that vampire effects them. That's annoying.
Card Sharp isn't capitalized correctly
also why is 'Tarot' in superposition's description that color
Like I think if people want to help more to the site right now besides like finding cases where score isn't being calculated correctly (like vampire right now) i think they also need to try and "stress test" the site for different ways to help make it perform better under different situations
if you use many blueprints and split them evenly among a retriggerer joker and a scoring joker it takes a noticeable amount of time to calculate
Well yeah, scoring takes time & retriggering takes time; if the normal situation is 5 cards scored by 5 jokers for one trigger = 25 scorings, doing 5 cards scored by 5 jokers for 5 triggers = 125 scorings, it's going to take about 5 times longer, not to mention that blueprints have overheard in finding who they represent (that bit might be able to be done as a one-time thing per calculation but isn't a high priority).
A lot of the lesser-used colors (words for suit colors, spectral, uncommon, planet, and tarot) I had just used approximations and never went in and made them color-accurate. I just went in and did that so next time I publish, they'll be the same as the in-game colors.
It should now
number of cards is the total number of cards. My thinking when doing number of cards first, the number of cards in hand, then pushing cards in hand, then pushing cards not in hand is that cards in hand is nested inside of the total cards:
all cards
cards in hand
cards not in hand (quantity can be implied by all-cards)
end
```But I can see why it might seem like a weird order.
Okay, sell value is now something that can be set and Swasbuckler takes that into account rather than a set value. I haven't put it in the URL thing yet though.
What are the default sell values of cards?
is there a way to input hiker chip bonuses on cards?
no, I keep forgetting hiker even exists. You can currently approximate via putting bull as your first joker with whatever the sum of bonuses would be; it won't calculate quite the same though.
the cost of jokers is in the main game.lua where they are defined, and the sell cost is math.max(1, math.floor(self.cost/2)) I think
although iirc, the cost can change
like the discount voucher changes the sell cost
Yes, the cost can change, but having a default value that's at least right some of the time is better than nothing.
I think this should be the defaults for each joker
being the buy cost not the sell cost
it seems inconsistant across rarieties
with the exception of legendaries
who are all 20 cost (10 sell cost)
That's like 40 out of 150 jokers.
Okay, I guess I was looking at the demo's code on accident. That explains why I kept finding discrepencies.
oh yeah that would do it
btw do you have a list of jokers your thing supports that support custom values?
technically, they all do.
I believe so; I was just getting a list via checking which use it in their description:
Stone Joker, Acrobat, Banner, Mystic Summit, Loyalty Card, Steel Joker, Glass Joker, Abstract Joker, Wee Joker, Supernova, Joker Stencil, Ceremonial Dagger, Fortune Teller, Hit the Road, Ride the Bus, Driver's License, Invisible Joker, Dusk, Throwback, The Idol, Satellite, Caino, Yorick, Bootstraps, Egg, Runner, Ice Cream, Blue Joker, Constellation, Green Joker, Card Sharp, Red Card, Madness, Square Joker, Vampire, Hologram, Cloud 9, Rocket, Obelisk, Erosion, Mail-In Rebate, Lucky Cat, Bull, Flash Card, Popcorn, Ramen, Seltzer, Spare Trousers, Campfire, Ancient Joker, Castle
ok that'll work
Sell value is in the URL now; omitted when it's a default value but you can include it 100% of the time for simplicity if you want.
https://github.com/EFHIII/balatro-calculator/blob/5baa41860ccf1796adfee51fbd6f4907747f6e84/hand-url.js#L157
sounds good
I'll have to check how the save does it but I think it just tells me the sell value
new url query parameter is h=, the old one is backwards compatible via using hand=
ok
also I think theres something weird with your index map for the jokers that have seperrate head and backgrounds
probably a missmatch between what you use for type and what the game uses
theres only 6 of them so I'll just fix it manually
Yeah, I use the background as the canonical position, I guess they're using the head as the canonical position.
You found my WIP fallback, lol
imma put this here so I don't lose it js [ 'j_stone', 'j_acrobat', 'j_banner', 'j_mystic_summit', 'j_loyalty_card', 'j_steel_joker', 'j_glass', 'j_abstract', 'j_scholar', 'j_supernova', 'j_stencil', 'j_ceremonial', 'j_fortune_teller', 'j_hit_the_road', 'j_ride_the_bus', 'j_drivers_license', 'j_invisible', 'j_dusk', 'j_throwback', 'j_idol', 'j_satellite', 'j_caino', 'j_yorick', 'j_bootstraps', 'j_egg', 'j_runner', 'j_ice_cream', 'j_blue_joker', 'j_constellation', 'j_green_joker', 'j_card_sharp', 'j_red_card', 'j_madness', 'j_square', 'j_vampire', 'j_hologram', 'j_cloud_9', 'j_rocket', 'j_obelisk', 'j_erosion', 'j_mail', 'j_lucky_cat', 'j_bull', 'j_flash', 'j_popcorn', 'j_ramen', 'j_selzer', 'j_trousers', 'j_campfire', 'j_ancient', 'j_castle' ]
list of ones that use abilities
wait why is egg in here
with the sell value being supported, it shouldn't need that anymore
We've gotten out first joker value transfered over
oh ice cream has the (Currently +90 chips) but it should just say +90 chips at the top (like popcorn)
It's a visual thing only
I put it there more to remind me that egg is anoying
ok fair enough
I've removed the text from egg and fixed the text for ice cream
That doesn't surprise me. I tried to normalize how I interpreted them as much as I could.
yeah
you might need to fix it again
also bruh
oh bruh the planets even have a spot for total usage where the tarots have
ehh, I forgot to delete a dollar sign. fixed now.
It's just trying to be error resistant
No I meant the one uses the global varible and the other loops over and counts
ok a couple things
- queens seem to be sorted as the highest cards, when they should be between kind and jack
- I can't seem to select any kind of modifiers in the card GUI
if I zoom out a bit they show up but then when I zoom further out or back in they dissapear again
This says +mult but its actually +chips (it does the math right though
theres a slight inconsistancy here
let me investiagte
oh I think I made a mistake
oh it was floating point aritmatic
That's for Baron, I just didn't bother to not do it when Baron isn't there.
why would you do it that way with baron?
Or just shoot the moon with steel aces/kings
okay makes sense
Raised fist makes things more complicated to optimize though, which was annoying.
It's not even about floating point; just the multiplier number it shows you is rounded, but in the math it uses the exact value.
no it was a floating point in my code
(joker.ability.x_mult - 1.0) / 0.1 when x_mult is 1.2 this is 1.9999999999999996
I then just converted that to an int which is 1 and not 2
If you change the order of operations, you can get it to come out to 2 without rounding
ah thats smart
I just stuck a round on the function calling all of the conversions just in case
That relies on the 1.2 not having floating point error already though, which might not be safe.
I belive this value should be whatever the card is visably displaying so it should be fine
also is abstract something the calculator can do itself?
oh also are hiker upgraded cards something I can do?
I chose to have it as a value just for if you're putting in only some of the jokers
I guess
If you have some cards that you know are useless, it makes the optimizer faster to omit them.
oh how do I do supernova?
oh also this is wrong
I forgot that supernova's not implemented properly. It's currently a static mult, but there's no UI to add times hands have been played.
Yeah, I had just noticed
I'll append hand counts to the end of the URL format, here's an outline:
/*
include hand counts? - 1 bit
for each hand type:
played this round? - 1 bit
is non-zero? - 1 bit
count if non-zero - 16 bit unsigned int
*/
// hand counts (for supernova/obelisk/card sharp) - 1 bit
if(false) {
binary.push(1);
for(let i = 0; i < hands.length; i++) {
// played this round? - 1 bit
binary.push(hands[i].playedThisRound ? 0 : 1);
// is non-zero? - 1 bit
binary.push(hands[i].played ? 1 : 0);
if(hands[i].played) {
// count if non-zero - 16 bit unsigned int
binary.push(...intToBinary(hands[i].played, 16));
}
}
}
else {
binary.push(0);
}
oh this will allow obelisk to work better too
also it might be nice to get a hand thing for card shaerp
Added an extra bit in that same area to the spec above
Why is seltzer an active/deactive joker?
also hows castle work with it having a chip and suit?
Because I didn't know that it would disappear once used up when I started working on this
The suit is purely aesthetic
I guess
oh I just pushed my changes
everything should work now
its a tiny bit clunky to use, but I'll fix that later
its bed time
5oak: 120x12 not 100x10
flush house: 140x14 not 120x12
flush 5 is correct
@dark pier just tested all in game
i could see this being in a balatro sandbox thing
i wish we had a sandbox but it ended up not being done for full game
so now we make the sandbox
well that's where mods come in
i guess
Yeah, flush 5 is the only one I tested
fixed
How hard would it to be to port the efforts here into an in-game score preview? That's definitely the single thing I find most missing from the game that I'd love to see modded in.
As a lazy approach, it's probably possible to convert the necessary part of the calculator into a node.js library to be called by lua from within the game.
I mean I think a save state kind of system would be possible
Just save the game, play the hand then save the score and load it
I guess you don't have the optimization then
I don't care about the optimization feature; I care about constantly having to do the math myself. Specifically, I would want a preview of exactly how much score I'm about to get with my currently selected hand + the current jokers I have automatically show up when I select the hand. Would literally save me a good 20 minutes per run compared to constantly doing the math manually. (Randomized factors can just show min/max as this Calc currently does.)
Does this account for DNA with Brainstorm causing 2 of said cards being in your hand during scoring?
if you want you can try using my save editor which I just put some support for putting the data from the game in the calculator.
https://balatro.shorty.systems/
no
I hadn't considered that niche scenario
I'm basically rewriting the entire simulation code, so it's going to be a while (probably like a week) before I have any significant changes, but when it's done, I should have significant raw performance improvement, significant algorithmic performance improvement, multithreading, and Monte Carlo based mean/median calculation. I'll also be implementing a few of the things currently unimplemented while I'm at it.
I'm testing to see what the performance hit for using a big-float (mantissa & exponent stored separately as float64) would be.
There's a JS library, break_infinity.js that does that, but I only really need add and multiply, so I was able to make a custom implementation that's about twice as fast as it:
Still about 2.5 times slower than float64 (while not breaking until around 10 ^ (9 x 10 ^ 15)), though that's doing exclusively math operations so the full simulation probably won't quite be 2.5 times slower.
wat
My array of test values was getting too long; I cleaned that up, and it's normal again.
Making my version only occasionally normalize the mantissa sped things up a little.
I mean if we have all the other performance improvements I doubt the slowness would be that much of a problem
Maybe, but I expect this to be one of the main possible bottlenecks, so I want to make sure it's optimized before it would be a lot more annoying to change.
Makes sense
In your rewrite could you have it show us the E value as well so we know "Yeah... thats e13", without me having to count?
It already does that
oh okay, last time I used it it didn't.
I think the threshold is just higher than it is in-game
I also use x 10^exp since that's easier to understand
e is basically a replacement for x10^
I understand that. Its just last time I used it I recall it having shown the whole number
As I said, I think the threshold is higher than in-game
Yeah I heard you. Was talking to nick
yea the switch to e numbers happens at trillion ingame
actually wait
the lowest one is e11 i believe, so that would be 100 billion
There, now the threshold is 1e11
i wanna take a guess at what the if statement means
"if card[3] is equal to 5 and is not card[6]"
i only have decent coding knowledge lmao
I assume that list stores attributes of a card
I’d guess “if card is steel and not debuffed”
In Javascript, single = means assignment, double = means loose equality, and triple = means strict equality.
Yeah, card is an array with the indecies meaning:
[rank, suit, edition, enhancement, seal, extraChips, disabled]
so card[3] === 5 means card enhancement equals 5 and 5 happens to represent steel. Similarly card[6] means card disabled is falsey aka card not debuffed.
I realize the readability isn't great, but I think it's fine for this.
Some notable differences (besides the card format being a 1D array of numbers and a Boolean rather than an object of objects of Booleans or numbers) is the triggerCardInHand function only taking 1 parameter instead of 9 and the steel card check taking 2 conditions instead of 4 (one of which was a slow indexOf() check).
lol when making my seed searcher I had to completely rework a lot
Yeah, performance probably matters even more for that kind of application.
There’s probably a lot you can optimize still for that
Wouldn’t be surprised if someone comes along and makes a pull request that triples the speed of the searcher or something like that
I've been meaning to check out you seed searcher, but I don't really want to do seed searching until I've beaten most of the game and I only just beat my first run on gold stake today.
makes sense
If I wasn’t involved in the technical aspect of the game I would probably be playing a lot of runs for 100% completion
I swear I've spent more time programming this calculator than I have playing the game.
Yeah I feel that
Multiple times, I've been hanging out with friends who all are playing the game and I'm just programming in the background.
I mean at least I enjoy programming
I love programming so much that I quit a programming job and left the software field so that work wouldn't ruin the fun for me.
wow
qctually I can check how much time I've been programming this thing
oh wait actually theres a bit more if I expand the search
If I were to estimate I’ve probably spent 30-60 hours on Immolate
Haven’t kept track though and it was across a very long period of time (since the beginning of January, and going back to October if you consider really old versions)
Like it started out in October as a program that looked at the screen to manually search seeds
A literal hold R simulator
lel
Incase anyone's curious; one of the major algorithmic improvements I'm making is, for optimization searches where cards played and joker order are being optimized, right now it checks every combination and permutation in a fairly straightforward way of just checking their score, but what I'm working on changing is making it so that it precomputes as much as possible, so:
First it'll pre-compute everything that it can knowing only what jokers are played (not joker order, cards played, or cards played-order)
then it'll loop through all permutations of jokers and pre-compute what it can using that new information, e.g. pre-determining what card blueprint and brainstorm are copying and how much Swashbuckler's multiplier is
Then it'll loop through all n choose k combinations of choosing cards to be played and pre-compute what it can with that information, e.g. what type of hand it is, vampire, obelisk. It'll also pre-compute triggering cards-in-hand effects at this time.
Lastly, it'll go through all the permutations of the order to play cards and compute the final score.
I also want to prune redundant permutations, but I haven't spent too much time thinking about that bit.
All told, I'm expecting that to increase performance by multiple order of magnitude in some cases.
im ashamed i got jumpscared by your paragraph
Hey, it calculated a thing
nice
Only took 1000 lines of code with none of the jokers implemented (a lot of the structure is done though; jokers are basically the only thing left)
thing is calculated, seal of approval granted
can someone help me with that? i would like to have that info, but i dont get how to get it
I wonder if it'd be possible to use, for example const ENHANCEMENT = 3; const STEEL = 5 at top level and then use card[ENHANCEMENT] === STEEL
would JS be able to optimise that ? 🤔
but yeah I guess having them commented all at one place is easy and doesn't make reviewing the code too bad
pet peeve material right here
I'd say probably?
It'd definitely be slower, but probably only on the order of microseconds, and probably only at compile time.
I do have them all defined in-code:
I see
I did specifically use consts because I do not trust optimisation being done if we try getting them from an object, I guess the correct method would be to measure it
Yeah. I'm definitely not going to be using them from the object. The objects are there because I'm writing this in a way that it can be used as an npm library independent of my calculator and the objects can be exported in a module.
This is what part of test.js looks like:
And the card function just builds an array.
In this context, Balatro.suits.clubs being unoptimized doesn't matter because it's only run once compared to the potentially many, many, many times it's used.
I don't think I wont to do this for joker names, but this should be fine.
I always find it a little jarring that the ranks are offset by two, but whatever.
I did this for literally everything in Immolate lol
Just stuck it in a massive enum
Also you forgot Ace
I noticed right when I posted the image
There is a conflict in that disabled joker is a different index than disabled card, but their edition is the same index.
there
I lied; I have a few jokers implemented
regex replace is great
if you use 7 zip, you can extract the games code. This is in the file game.lua
Improved editions styling
that's pretty good
oh yeah next time you make a breaking change in the url format you should add gold card's
It's already WIP
👍
IIRC, gold matters in the event of vampire and that's it.
the only other time it would trigger when played is with the gold ticket and that just lets you get the money
That doesn't effect score though.
Unless you have bull/bootstraps
That's such a niche case, why
I mean theres a few other jokers that could increase money before bull/bootstraps
I didn’t even think of that lol
also gold seal
Lucky cards
I think business card
I'm not implementing money tracking for the sake of this niche case.
At least not right now.
tbh money tracking would be nice so you change all bull and bootstraps at once
That's not even a good build.
I'll maybe look into after the big update I'm working on, but not before.
bull is a good build wym, bootstraps can sometimes be useful for the lack of other scaling
Bull + bootstraps only run or bust
how do you activate dusk on this
nvm
i figured it out
i crashed the calc by accident
You probably just gave it something that takes a super long time to run. I've yet to see it actually crash, just hang due to large calculations.
I'll try and make it harder for that to happen later, but just try and be mindful for the time being.
nah, it just straight up crashed
its fine, it makes sense
it also may just be my laptop being shitty
The engine rewrite is nearing completion. It's fully functional for pretty much everything except some jokers
That includes all of the improvements I mentioned here except for the "pruning redundant permutations".
Idk if you've done this already, but if you make it an api, it wouldn't be too hard to incorporate this into a mod to show calculations in game.
I'm sure this has been asked before (and if so I'm sorry), but do you think an in-game calculator would ever be possible?
proving the haters wrong
@cold raven I remember him saying this
Did you really play a 5 card straight with 4 fingers
Habit - I would rather overshoot than miss by a few chips to play trash hand
That's fair yeah. 👌
Oh that's neat
If that is actually accurate, it shouldn't be too hard to add as a mod that shows it
It is accurate from what I saw
But at the same time I was doing inf tests so I didn't really see low numbers
I'm wondering if it's calculating things like gold seal incrementing bull a bunch of other smaller interactions
https://efhiii.github.io/balatro-calculator/?h=FADiUAAcSgADiUAAcSgADiUAAcSgADiUAAcSgADiUAAcSgADiUAAcSgADiUAAcSgADiUAAcSgADiUAAcSgADiUAAcSgADmHMOYcw5hzDmHMOYcw5hzDmHMOYcw5hzDmHMMAAQFUCqBVA
Here's the score for this hand (with different numbers of 2s) going past naneinf
Calculate the score of any Balatro hand
(also, the engine rewrite is done, now I just have to integrate it)
Hype
Nice
will you update it to calculate seeds?
If you integrate this with something like Immolate, then you’ve pretty much just created a clone of the game lol
So I don’t think that will be something that happens (although I wouldn’t mind helping if you are interested lol)
Possible but difficult
Since both tools are written in different languages (OpenCL vs JavaScript)
The best way to do that would probably be to port Immolate to WebCL
Since those could both run in a browser
im way too dumb to figure this out lol
What would be the advantage of having them together in one tool that you don't get from using them separately?
They try to accomplish completely different goals; one being finding the best seed meeting certain conditions, the other being finding the best hand given certain cards/jokers.
I don't see how you could easily combine the two in a meaningful way besides just having the convenience of things being in one place.
At that point just recreate the entire game
soon we'll just make a tas to play the game for you
I was actually thinking of making a TAS mod at some point
Why play the game when you can get the game to play for you
In Soviet Russia, the game plays you
btw, will the new engine show you the number if you get past inf? cuz i imagine if you have like a new library that can go past inf it wouldnt be hard to just show the number also on the site
@bright cloud appears so
Yes, it'll go up to 1e(9e15)
aka 1 x 10 ^ 9,007,199,254,740,992
(The limiting factor there is that the exponent is stored as a JS number (aka 64 bit float) and 64 bit floats can only store up to 52 bit integers before losing precision. It won't completely break at 1e(9e15) but it won't reliably be correct)
The calculator doesn't seem to count DNA rn
it can matter if the cloned card is then has an in hand effect
Yeah, I've been made aware of that.
I consider it low priority because I consider using DNA to be a throw-away hand.
high priority is getting the new engine integrated, which is proving anoying.
like cloud 9
DNA matters with cards in hand shenanigans mostly I think
Steel, yeah
Here's a demonstration of the performance improvements:
big hype
Huge
The new engine is live.
I expect there to be lots of bugs
well i can easily tell the site is using my cpu by just the sound the fans make when i try to add more jokers lmao
Yeah, before it would be nice and only use a small amount of resources but be slow, now it's a greedy little guy taking all it can get.
little is an understatement, i have a 7800x3d and 32gb of ram and its making chrome crash with like 6-8gb ram usage
its crashing when its getting near 100% cpu usage
How many cards/jokers are you trying to optimize?
im doing a stress test but im having like 14 jokers
i know its alot but like thats what im interested in
https://efhiii.github.io/balatro-calculator/?h=cAASGAO4YA7hGDAHcMAdwwB3DuGAKAAptU2qbVNqm1WU this is what im trying to use optimize jokers on
Calculate the score of any Balatro hand
Well yeah, the amount of work there is follows a factorial curve based on the number of jokers so 14 jokers would be 87,178,291,200 permutations.
so what needs to be done is the permutation reduction thing you said?
Yeah. I haven't implemented the pruning I talked about earlier.
yeah pruning that was it
I wanted to get this out since it's already significantly faster.
also is it just me or is the breakdown looking weird in the site?
nah dont get me wrong im already thankful for this
It's just you
The breakdown is completely borked right now since I had to rewrite that too, though I don't know what breakdown you're seeing.
alot of them are broken but this is the best example
it has jumps of like 26 it seems
it jumps from 0 to 26 to 52
yeah 26 each time
Yeah, I forgot to normalize the exponent before rendering (The number is correct, it's just not normalized to between 0.1 e x - 1 e x)
I also need to add styling so that polychrome is transparent.
also idk if itll be easy to add or not, but the joker arrows you have seem so unintuitive, would it be hard or not to maybe do like joker dragging or something?
It's something I have as a thing to think about, but it's just very low priority compared to things like making it not give incorrect numbers.
aight if its on the list its fine
I've added most of the things I remember being things people want as issues on GitHub.
Feel free to add any more that you think are important.
https://github.com/EFHIII/balatro-calculator/issues
should be fixed now
Do you find yourself being too good?
Do you wish you could get another hand played for Ride The Bus?
Well have I got the toggle switch for you!
Introducing: Minimize Score!
DNA should be fixed
are you sure about that?
oh wait I think it does but the breakdown doesn't seem to do it
Calculate the score of any Balatro hand
I thought I had tested that and it was good, but I guess not. Should be fixed now.
Check this out
Calculate the score of any Balatro hand
this is a great discovery, I was always with my calculator on the side, specially when avoiding too many points with ride the bus or vagabond
I love Bloodstone (sometimes)
is that median vs mean
that could be improved by replacing two bloodstones with a retriggerer
The point wasn't to be a perfect build; just to demo the new EV calculations
much better
oh does this use the new properites in the url now?
the one's for card sharp and uhhhh
that one card
I haven't really thought about it, but I think so?
There's no UI for those properties though, so if you make a URL that sets them, they're stuck that way, lol
I don't know
Could you link to where I mentioned these properties because I don't even know what properties you're referring to. I haven't looked at the URL code in a bit.
I didn't have the parsing of it written, but I just added it, so it should work now (as in in about 2 minutes)
Actually, Card Sharp still uses the Boolean even though everything is in place for him not to.
I probably won't change that until I have the UI for him setup.
fair enough
ui is hard, all users should just write data into a custom binary format by hand
Obelisk should work though
Right now, Obelisk always is X1 because the "most played hand" is always a tie with every hand.
oh yeah supernova
Supernova currently (for normal users) always gives +1 Mult because every hand type has been played 0 times by default.
tbh just add the ui in the hands section like how the game already has it
I want to, but I also want to maintain a semblance of mobile support
And there's no room
scroll bar go brrr
On mobile, you already can't read the score at level 500
supernova seems to work
card sharp and obelisc don't seem to
also supernova's description doesn't show properly
Calculate the score of any Balatro hand
This is what the above's game state looks like
pair was already played this blind
theres also a non-zero chance I messed up something somewhere
I guess this is the string I generated https://efhiii.github.io/balatro-calculator/?h=wAAkKAAaxwAA5SAAkABkAAzAmB0AoCQMgxAcC4DwNgZACBEBIHgLASA4AAANVwABVSgAHQ
Calculate the score of any Balatro hand
in case me messing with something made the calculator mess something up
Yeah looks like the played this round is properly parsed
I know
also my adding cards ui is still broken unless i zoom
Here's the data it got
There's no reason that the times played (the 3rd number in the arrays) should be less than the times played this round
wait did I switch the played this round or is that just how its parsed?
I thought played this round was a bool
It looks like here, I inverted the "played this round" for some reason
oh yeah I just got to that bit
let me fix that
That looks better
ok fixed build pushed
Calculate the score of any Balatro hand
new url
I'm getting all 0s from that URL
Calculate the score of any Balatro hand
I think the calculator might've deleted those parts
no, this one
I mean try that one
yeah it looks like the calcuaotr does not save the changes of those values rn
oh obolisc works now
wait
no it just seems to always reset now?
oh wait
nvm this is the wrong thing
:3head:
obolisc seems to not reset on the one with proper values, but does on the one with all 0 values
Yeah, since it wasn't used, I hard-coded it to never put them in the URL.
I just changed it so that it should now (again, it may take a minute to update).
Yeah, if everything's zero, you're always going to be playing your most played hand so it always resets.
yeah but if everythng is not, then I paly my most played hand, it doesn't reset
In this for loop, I forgot to put the .length in this.hands.length
It should be fixed now
I have no idea what's going on there.
truely a css moment
I just thought of a really niche interaction
actually I don't think it matters
yeah
adding width: 100%; here https://github.com/EFHIII/balatro-calculator/blob/main/index.html#L99 seems to fix it and not break it on chrome, but idk why this is happening
Either I'm look at the wrong line or CSS is being wonky.
Does the URL support gold cards?
doesn't look like it cause if I put one in and refresh it loses it's gold status
vampire and midas mask don't seem to behave quite right
iif the mask is after the vampire, it makes them gold after the vampire strips them, so the vamprie doesn't get xmult and the cards stay gold
but your's just has the vampire get xmult no matter which side
Vampire and Midas have their own phase? arg...
That means that, hypothetically, if you had multiple vampires and midases, you could alternate them:
And the successive vampires would all get additional X_mult
yeah
it also means if you have a bunch of gold cards already, you can jput vampire first and eat them, then re gold them
actually
thats odd
only one ate it
So apparently the vampire only eats once
Sounds like a bug to me
https://efhiii.github.io/balatro-calculator/?h=YAB-S1wVyiQCCEAO4Gi7ACQAKGo4BwAwGgzAMAoBgERAAyABIADYAEgALAARAAkABYA
Anyone know why in this link my vampire adds zero (says x12) and my brainstorm adds 0.
Calculate the score of any Balatro hand
the vampire was because I wasn't adding the existing value of vampire.
The brainstorm was because brainstorm (and blueprint) were just behaving like the other joker, not using its existing value.
Both should be fixed now?
on the website here?
https://efhiii.github.io/balatro-calculator/?h=UAB-VrgVyiQCCHcrXANF2ABorXANF2ABouwANF2ABouwAMAChqDAMswgRMwHANAYCpZIAQIiABkACQAGwAJAAWAAiABIACw
Calculate the score of any Balatro hand
@dark pier
oh yes thanks!
i hit refresh
love your work on this btw, so helpful!! 🙂
I do wonder if this is intended.
Let me know if you make a bug report about it somewhere.
Even just getting LocalThunk's response from seeing that would be interesting.
hm interesting, optimize hand is pretty broken with steel cards
optimize jokers puts my vampire first and copies it, and it seems to be huge
https://efhiii.github.io/balatro-calculator/?h=oAA0XYAQQfla4FcokA7gYAFDAYQIgIDgBqGXmA0BgKlkgREADIAEgANgASAAsABEACQAFg
you can optimize hand on this if it helps
Calculate the score of any Balatro hand
Looks like there is a bug report, for something slightly different, but someone brought this case up #1215730247434240040 message
not thunk response though
I did the thing and pressed play and got a billion points 🙂
The calculator was slightly lower than actual, I will post screenshots in case it helps.
before pressing go - 5 cards selected.
my points gained off that press, and the calculator (calculator didn't have +3 gold from playing Ace with golden coin on it, but that doesn't make up the difference. I The numbers seem to work out if this is the bug: One of my vampires gained the +5 ranks from 5 cards played properly in the calculator and the other one did not (Brainstorm)
I'm having trouble replicating your calculator state, do you have the link?
Calculate the score of any Balatro hand
i had some cards that were double buffed so that is hard to see visually
oops i will fix
i think i see the issue
vampire isn't sucking the enhancements? no indicator
the enhancements are not scoring as if they weren't there tho
Calculate the score of any Balatro hand
i think one of the 2 vampires was getting the buffs in the calc but not both of them
yep that is the bug
I learned a lot about how the math works from this website, so handy
Yeah, that seems to make up the difference
yep the only other differnce was the 3 gold I gained on the minotaur
why is mime retriggering those cards
*bull
wait im dumb
imma get some sleep
getting some abilities confused
It's not
It retriggers all card held in hand abilities and those are cards held in hand.
You can only remove enhancement once
After it's removed, another copy of vampire cannot remove it
brainstorm copies the vampire....
Brainstorm can only copy the Xmult effect

the point is vampire grows to 13 when it eats and then we copy the 13
That was nasty to try and fix, but it should be fixed.
I'm slightly concerned that there are other minor problems related to Blueprint/Brainstorm though.
like BP on runner and you play straight?
actually it does not even scale from playing straight
Yeah, I had a typo in the part of the code that says "this hand has a straight/flush" (it's fixed now)
Ignoring the typo, that's not an issue because that just checks a variable that's set for if the hand has a straight, and if true adds 10.
Right but then I add another enhancement, which you would think the other vampire can remove
yea and that's what happens, is it not?
No
so if you have midas -> vampire -> midas -> vampire
first midas +1.0X to first vampire
second midas +1.0X to second vampire. So they scale separately
that's the intended behaviour
Yeah but in the video, only the first vampire removes the gold and scales, and the others do nothing
oh, my bad, I didn't see the video, thought it was unrelated probably
is the intent to put the calculator into the game to automatically do this stuff eventually? or just on the website?
Just the website. The main intended use-case is for theory-crafting strategies.
Putting a version of it in the game would be a different project.
it has been really useful for telling my friends what i was doing, a screen shot doesn't really help people learn since you can't mouse over anything and read it and see the math in action etc.
I also learned a lot of the rules. I originally didn't realize that xmult was not all counted up like mult is, but indeed multiplied together like real math.
Yeah, it's definitely become a good tool for understanding how the game works, especially with the breakdown
Here's my idea for how to have the UI fit
Okay, it's live.
Card Sharp, Obelisk, and Supernova should all work now.
These buttons are hopefully helpful
The Play hand button should increment the values of relevant jokers (that don't involve tracking money).
Yeah. That one's admittadly a little clunky
Ever wonder what would happen if you had every joker?
Baseball Card is a significant contributor to the score.
i wonder how long will it take to optimize jokers xd
150! calculations, aka longer than the heat death of the universe.
optimizing around 81 jokers is where it gets to taking longer than the heat death of the universe.
When there are videos on how 52! Is big and here we got 150! Lmao
i feel like you could just put all the +mult before all the xmult, put the uncommon +mults after the other +mults, sort the uncommon +mults by their +mult value, put blueprint and brainstorm both copying baseball card. this is easy
There are a few more optimizations to make than that; I'm working on it rn
I was thinking how theres quite a few jokers that don't affect anything position wise, (things like oops! all 6's, egg, gift card, golden joker, burnt joker, smeared, etc.) and most of these don't matter if blueprinted, so you could just always put them on the left, (so they can still be swashbuklered)
but I worry if theres more cases I can't think of
wee?
i see wee tho
I'm probbaly blind then
notice the gap
ah yeah
also the four sinful joker art is outdated
Thanks; I had grabbed the sprite sheet from the demo on accident when starting the project and forgot to change that.
Should be fixed now.
long term expected value doesn't consider that in the long term scaling jokers will scale
long term expected value is the mean
It's not supposed to take that into account; I just figured most people aren't going to remember the difference between mean and median.
The long term EV of anything with scaling jokers taking into account scaling would be Infinity.
I finally got a solid run, but forgot to reroll the boss.
My highest hand:
https://efhiii.github.io/balatro-calculator/?h=YADAUAAYCgADAUAAYCgAA2UAALSgADwAJ6v1fq_V-r9X6v1fq_V-r9X6v1fqwAGI
Calculate the score of any Balatro hand
I believe there is an issue with raised fist - iirc, debuffed cards don't work with it, so the value is 0 when the lowest card held in hand is debuffed
Also, when adding cards, some of the cards held in hand don't show up at all (but will reappear once they would be in the played hand).
to mee, it looks like it's using the art for the scholar right now, not sure why
Oh yeah, I changed the sprite sheet but I was using a modified sprite sheet because the sprite sheet in the game (for some reason that confounds me) has a duplicate of Scholar's sprite in Wee joker's spot.
should be fixed now
https://efhiii.github.io/balatro-calculator/?h=gABBCAAQDgDw
does not show debuffed 10 in hand for some reason
Calculate the score of any Balatro hand
https://efhiii.github.io/balatro-calculator/?h=wABBDIDYEABAOAPCXgbw
Now debuffed king is also not being shown
Calculate the score of any Balatro hand
plus all debuffed cards still trigger held in hand jokers
This is known, see the github issues.
Is it possible that for jokers like square, castle etc. you specify value as the final mult/chips value? manually removing the base and dividing chips on the joker is super annoying
and first time I used it, got super confused, since I assumed it already takes the final chips value ^ so the results were incorrect