Math Thread

prime factors are easily the most useful thing i've learned from AOPS so far

trying to figure out if I can factor any number out of 250 and some arbitrary number

250 = 25 * 10^1
25 = 5 * 5, 10 = 2 * 5
therefore 25 * 10 = 5 * 5 * 5 * 2 = 5^3 * 2

does the arbitrary number end in a 0 or 5? remove a factor of 5
does the arbitrary number end in 25, 50, 75? remove a factor of 25
is the arbitrary number a multiple of 10? remove a factor of 10
is it even? remove the only factor of 2
done

useful in so many circumstances

prime factors and powers of 10 make me horny

Add up all the digits. If their sum is a multiple of 3, then it is divisible by 3.
Same thing for 9.

Jesus Christ I literally thought I published this on arxiv and got a fields medal

1 Like

i know the divisibility rules and they all rule

now do the proof

Yeah this looks interesting but very slow. A* with jump-point search/goal-bounding is much faster if the map is mostly static and caching is possible.

In my project we need 3d pathfinding and instead of goal-bounding I prune the search space using a precached portal+room path map (works fairly well and better than hierarchical).

i feel like im doing this because A* is too slow for my uses.

i think a* faster on big maps not a lot of actors, this will be faster on small maps with a ton of actors.

oh huh i might look into that. 3d pathfinding is something ive ever implemented before and i'd like to have a better understanding of what to do.

What do you do again? Also, glad to see you realize the importance of linear algebra now. Asoul used to give me a ton of shit and claim it was evidence that I didn't know anything about software engineering because I've always said how important it is for software engineers

yea i really wish i paid more attention in my linear algebra classes in college. primarily i wish i was more comfortable whit matrix math

right now im a gameplay programmer at a small indie game studio but in the past ive worked both as a technical designer (mostly like systems design and implementation) and as an audio programmer.

That's true of standard A*, but JPS+GB is thousands of times faster. It would be faster to run all of the individual queries on hundreds of agents on any sized map than the single flow field one. That said, you can probably do a number of optimizations on the flow field algorithm to speed it up.

oh for my specific use case the flow field itself would be prebaked which cuts down most of the computation time.

that being said im actually not familiar with JPS+GB A* so ill have to look that up thanks for htat.

also half of why im working on this flow field thing is that i think its like a perfect use case for data oriented design/programming and as i learn that this seems like a really cool thing to implement.

this does seem pretty cool. if you have other papers/soruces you'd recommend i check out that'd be great. just skimming it this seems a lot smarter than traditional a*

I like the idea and it sounds like fun to implement, just pointing out that pathfinding is basically a solved problem at this point.

yee

Yeah, Steve Rabin did a lot of the work on this so he's the person to look up.