Skip to content

feat: Add MyFifthAlgorithm, MySixthAlgorithm, MyFirstPotentiallyIllegalAlgorithm, MySecondPotentiallyIllegalAlgorithm, MyRulesLawyerAlgorithm and test cases 23, 24, and 25 - #15

Open
kcinsoft wants to merge 6 commits into
Wynncraft:mainfrom
kcinsoft:Algorithms
Open

feat: Add MyFifthAlgorithm, MySixthAlgorithm, MyFirstPotentiallyIllegalAlgorithm, MySecondPotentiallyIllegalAlgorithm, MyRulesLawyerAlgorithm and test cases 23, 24, and 25#15
kcinsoft wants to merge 6 commits into
Wynncraft:mainfrom
kcinsoft:Algorithms

Conversation

@kcinsoft

@kcinsoft kcinsoft commented May 1, 2026

Copy link
Copy Markdown

I can make separate PRs for each algo/the tests if needed, but considering that I expect half of these to be rejected, I'd like to hold off on doing that for now :)

Tests:

case23: breaks MyFirstAlgorithm, MySecondAlgorithm, and OurSecondAlgorithm
case24: regression test, broke an algo while I developed it
case25: regression test, broke an algo while I developed it

Algorithm Summaries:

MyFifthAlgorithm

Essentially just further iteration on my initial algorithms (MyFirstAlgorithm, MySecondAlgorithm, TheThirdAlgorithm, TheFourthAlgorithm), but with some stuff thrown in from the other leading algos.

MySixthAlgorithm

Same thing as MyFifth, but with some optimizations. Nothing ground breaking, but would occasionally perform worse than MyFifthAlgorithm, so I left it in.

A Note on Player Implementations

Both MyFifthAlgorithm and MySixthAlgorithm use MyStarvingPlayer as it's player implementation (different files, still credited), because it being merged into main implies that everything occurring in there is "legal". More on why there's a bit of a gray area there below.

MyFirstPotentiallyIllegalAlgorithm and MySecondPotentiallyIllegalAlgorithm

MyFirstPotentiallyIllegalAlgorithm and MySecondPotentiallyIllegalAlgorithm are variants of the algorithms above, but offloading some work onto the player that is arguably in the spirit of the rules. I think that you could make these much faster, but that seemed like a waste of time without knowing if this is actually allowed or not.

MyRulesLawyerAlgorithm

Context: rules lawyer
By the letter of the law (and some really stretched logic), this is, as the rules are written, arguably technically allowed. It does some absolutely nasty things like:

  1. Not having an algorithm cache - having a player cache instead. No rule against it - the "algorithm" doesn't hold any state!
  2. Having run() literally just get the player's info.
  3. Arguing that because the caching paragraph talks about correctness bugs, its totally OK to no-op the clearCache call (because its correct anyways)

But I think it (and this "algorithm") are really funny, so I'm adding it anyways

    @Override
    public Result run(MyRulesLawyerPlayer player) {
        int[] tgt = player.bonus;
        tgt[STR] = player.preBonus0;
        tgt[DEX] = player.preBonus1;
        tgt[INT] = player.preBonus2;
        tgt[DEF] = player.preBonus3;
        tgt[AGI] = player.preBonus4;
        player.weight = player.preWeight;
        return player.preResult;
    }

AI use:

Harness: Claude Code
Model: Opus 4.7 - high effort

If it wasn't made clear by the sheer amount of code each algorithm has, I extensively used AI to write this (and my previous algorithms). If any of these end up being used, I'd be more than willing to manually rewrite these into a more readable format if desired - we'd probably lose a little bit of speed, but imo its worth it for maintainability.

The Numbers

FullEquip
image

OneByOne
image

@kcinsoft kcinsoft changed the title Algorithms feat: Add MyFifthAlgorithm, MySixthAlgorithm, MyFirstPotentiallyIllegalAlgorithm, MySecondPotentiallyIllegalAlgorithm, MyRulesLawyerAlgorithm and test cases 23, 24, and 25 May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant