Hacking Calculords part 2: Who needs fingers?
rkoutnik.com
rkoutnik.com
If you want to play with neural nets, by all means be my guest. But if you're just looking to do the job, this is probably a much easier way.
One quirk of using NN for that task is that since I've already got all of the possible outcomes, I need to deliberately overfit to my data (and it's a rare case where 100% accuracy is to be expected). Of course that's a good sign I shouldn't be using NN anyways, but we've beaten that drum...
This, I almost peed I laughed so hard. And I had to pretend that my python code was hilarious to convince my coworkers I was actually working (not hard, it is hilarious).
(and nice cover-up with the Python, smart to use a language named after the greatest comedy group of all time).
Also the line
>At this point, it was clear I had two options:
>Armed with a trivial example and an inept grasp of the tools available to me, I could write a snarky Medium post about how terrible JavaScript is
>WebWorkers
Having been on both the receiving, and a few times sending, end of such posts (although not on medium, and not about js, for sending) I understand, empathise, and cannot help but laugh. Steve Yegge at his best couldn't have phrased that better.
Your tweet answer was: "Not intentionally, but since we're deploying everything in the same row, it should be able to take advantage of that."
But that doesn't make sense to me - if you optimize for your 9 cards to spawn all 6 available units/cards, but the best solution is still only 5, at the end you might be left with that remaining soldier and a [5] card in your deck - whereas the best solution for the ten cards, including the newly-spawned five, might let you deploy all six units.
(There are other weird edge cases as well, such as the $2 card that lets you discard all of your units and draw 4 new ones.)
Unfortunately I don't recall exactly how Mutate Stargod works, from your response it seems like I've misremembered how it works, mind posting the card text here? (I thought it absorbed already-deployed mutates).
Mutate Stargod is an $85 "Tactician 5" card: Generates a 5 in your calculator when deployed, and gives all allied mutates in lane +1HP.
I think that even without machine learning, you could build a pretty decent AI just with the "spam maximum units" tactic; that's why my favorite deck is all mutates, preferring things that deploy multiple units.
I think hardcoding exceptions and edge-cases like Tactician cards would vastly increase the number of calculations you'd have to make - because now the order in which you deploy units matters, and calculations have to be re-considered from every possible deploy-point on - although it may be enough to get to a solution in which you empty out your calculator, and hope that the second calculator deal lets you empty the rest of your units.
(This naive approach may not work for the harder bosses, though - spamming a single row against Hate Bit is a good way to roll out the red carpet for him to your base, since it's likely he'll get there before you do unless you get an incredibly lucky deal.)
The current algorithm is exhaustive, so one run will generate all of the possible solutions to the given deal. Once all the solutions have been computed, the AI could run through the top n solutions and pick the best. This way the number of calculations is additive, not multiplicative. That's still thinking per-round though (not at the game level). It should be possible to determine if there are enemy units within striking distance of the base and deploy counterunits (so your eggs aren't all in the same basket of the top lane).
I haven't encountered any tactician cards yet (confession: I haven't even reached Hate Bit, I've been so focused on the coding/blogging and it's easier to debug against Fancybot).
Ooh, you're in for... uh... well, not a treat. But a challenge!
The emotional roller coaster I just went on of:
"Did I miss the release of Calculords 2?"
"No... I am not that out of it."
<click>
"Awww... Punctuation got me again."
I actually thought about trying to make a web-based multi-player version, but I don't want to rip off Seanbaby's hard work. (I also don't want to make a 'skinned' version that I could argue isn't a complete copy, because I don't want to have to come up with the hundreds of units that would require.)