I model and doodle stuff

  • 28 Posts
  • 76 Comments
Joined 1 year ago
cake
Cake day: September 1st, 2023

help-circle
  • Google search results are often completely unrelated so it’s not any better. If the thing I’m looking for is obscure, AI often finds some thread that I can follow, but I always double check that information.
    Know your tool limits, after hundreds of prompts I’ve learned pretty well when the AI is spitting bullshit answers. Real people on the internet can be just as wrong and biased, so it’s best to find multiple independent sources



  • Kaelygon@lemmy.worldtoMicroblog Memes@lemmy.worldMasochism
    link
    fedilink
    English
    arrow-up
    2
    ·
    19 days ago

    I loved every bit of Rain World! But I ended up quitting it mid play through when it became too hard. I found a way to gather stacks of berries to have enough reattempts for the hard parts, but then got lost where I was even supposed to go and gave up after ~25 hours playtime


  • Kaelygon@lemmy.worldtoMicroblog Memes@lemmy.worldMasochism
    link
    fedilink
    English
    arrow-up
    2
    ·
    20 days ago

    Whoop, I mixed up dark souls 3 with Elden ring. Though, the same applies. I did like the gritty atmosphere and lore. The main issue I had was the learning curve and when trying to playing co-op there was no way to turn off strangers joining what I recall. But I bet by now there’s mods for all of that like you said.



  • It appears to always run in ~30 milliseconds regardless of the tested number, so this might be O(1) until some bottleneck kicks in. Though I have yet to verify the complexity as the quality of division rule depends on a,b and c ranges.
    Edit: after some testing it’s some logarithmic complexity when P is bigger than 10^2000

    P size, time seconds
    10^3000, 3.11
    10^4000, 6.43
    10^5000, 11.27
    10^6000, 17.69
    10^7000, 26.31
    10^8000, 37.09
    

    Plotting these gave about O(log(P)^2.5)
    The bRange, math.gcd() and reciprocal scale with P digit count but rest of the calculations are O(1).
    I have no idea why you would need 10^8000 divisibility rule designed hand calculations, but you can get one under a minute and this isn’t even multithreaded!


  • Funnily enough, I just sped up my own solution by 25000% without compromising anything.
    https://pastebin.com/Dkbq2chV

    I realized that multiplying the divisor P by its non-zero reciprocal digits, gets you near 10^n which are ideal numbers for the divisibility rules. Which should have been obvious since n * (1/n) = 1, and cutting off the reciprocal results in approximation of 1, which can be scaled by 10^b.
    e.g. finding divisibility rules for 7

    1/7=0.14285...
    7*14=98
    7*143=1001
    7*1429=10003
    

    The first script was very naive brute force approach.
    So instead of searching every combination of a, b and c, I can just check the near multiples of P*reciprocal.
    The variables can be solved by P*N = a*10^b + c when b is given and a is 1 to 9
    7*1429=10003 would expand to P*N=1*10^4+3


  • I wrote some terrible python code to search divisibility rules for a given number and it tests example product divisibility

    Edit2: https://pastebin.com/Dkbq2chV Yet another revision, I got caught up in this project but I think it has enough features now. I added few command line options and details you can edit in the script.
    I need to stop before I add more features. Here’s example output:

    $ python ./findDivRules.py -h
    
    python ./findDivRules.py [Integer or "(Start,End)"] [Show example? (0,1)] 
       [Example is divisible? (0,1)] [Parker style? (0,1)] [Rule count] [Rule index]
    Default command : python ./findDivRules.py 313 True False True 10 0
    Range example   : python ./findDivRules.py "[1,11]" 0 0 1 2 0
    
    $ python ./findDivRules.py 313 True True True           
    
    Found 3 rules for 313, showing first 10:
      P    N    a    b    c     P*N
    313   16    5    3    8    5008
    313   32    1    4   16   10016
    313  639    2    5    7  200007
    
    313 has following divisibility rule using B*a-A*c
    Split the tested number into A and B after 3rd digit.
    Multiply A by 8 and multiply B by 5
    Subtract A from B = B*5-A*8
    
    Example:
    Using rules P=313 a=5 b=3 c=8
    Testing 700807 divisibility by 313
    
    A|B      B*a-A*c        Intermed
    700|807  807*5-700*8       -1565
    -2|435   435*5+2*8          2191
    2|191    191*5-2*8           939
    0|939    939*5+0*8          4695
    
    Smallest iteration 939 = 313*3
    700807 is divisible by 313
    







  • I forgot to mention that the video shows 5pp for Venom Bite, but decided to change it since to more closely match thunder.
    Old: 5pp 120 power, 85% accuracy, 33% chance to poison
    New: 10pp 120 power, 70% accuracy, 30% chance to poison

    I decided to lower the accuracy because poison status already deals 1/8th the damage each turn and Fire blast which accuracy is 85% has only 10% effect chance. The lower accuracy then balanced by the power point increase.

    Comparison to gen 2 moves:
    Fire blast: 5 pp, 120 power, 85% acc, 10% effect
    Hydro pump: 5 pp, 120 power, 80% acc, --% effect
    Thunder: 10 pp, 120 power, 70% acc, 30% effect





  • After some thinking I came up with this.
    Conjecture:

    =+b²
    N  = c²+d²
    
    a = 2*c*d
    b =-c²
    
    integers a,b,c,d>0
    
    For any integer N that can be expressed as both N²=+b² and N=c²+, the relationship a=2*c*d holds.  
    

    Is it enough proof just to show that the above equations are true when substituting them to N² and N equations?
    If a = 2*c*d then one leg of the Pythagorean triple definitely contains c and d factors and ‘2’. This might be related to Pythagorean triple parametrization.

    I fixed the flawed ChatGPT counterexample finder script and now it gives this list of all numbers including composites which don’t follow these rules, such as 58. Here’s sub-sequence of A004431 numbers that don’t follow the rules:

    Numbers which neither Pythagorean side is divisible by 4
    Composites: [10, 26, 34, 50, 58, 74, 82, 90, 106, 122, 130, 146, 170, 178...]
    This is identical to Sums of two distinct odd squares A339977 which makes sense as if c,d>1 and odd, they must be 3 or bigger hence their factors are missing the extra ‘2’, unlike primes where one of c or d is always even.
    Even composites appear to follow a=2*c*d relation. The prime pythagorean side divisibility by 4 appears to be just a side effect.