Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

algorithms worth knowing

Name: Anonymous 2015-06-12 15:07

What are some of the most powerful flexible algorithms you use? Stuff that made a big speedup or something.

Here's a cool one I learned for games: buckets: If you wanted to have a screen full of balls that can each bounce off each other then you'd have to do O(N^2) collision tests. So what you do instead of is divide the screen into buckets about double the size of the character; make a linked list of each cell putting the characters into the right buckets then do the collision tests per bucket O(N) since you generally only between 0 and 2 characters in one cell. Let's you have millions of objects when before you could only have a couple thousand.

Name: Anonymous 2015-06-12 15:16

Wouldn't that cause countless unnecessary assignments?

Name: Anonymous 2015-06-12 15:17

My favorite one is holding it in, letting it build up some pressure while it massages my prostate, let a few farts squeak out, then unleash the beast: PLOP!

Name: Anonymous 2015-06-12 15:51

buckets

I'm pretty sure that you're supposed to arrange the buckets in a tree? Wouldn't that be preferable to a list--then you can group buckets and run your detection on several at once for large character (right??)

Name: Anonymous 2015-06-12 16:06

>>1
give me a nice hunk of flambda for dinner

Name: Anonymous 2015-06-12 16:15

that's a special case of the n-body problem. Any close enough solution fails the philosophical problem of how the universe solves the true problem.

Name: Anonymous 2015-06-12 16:19

>>6
the philosophical problem of how the universe solves the true problem
The real problem is philosophy. It is stupid word-adulterous bullshit. Alexander the Great had the best solution when he cut the Gordian knot.

Name: Anonymous 2015-06-12 16:30

>>7
I agree, kosher philosophy is babbling about words to no end, I meant true philosophy and this problem apply. Somehow the n-body problem is solved perfectly by the universe and any way you cut it, it requires computation beyond what is reasonable or P=NP or there's more beyond what we can reason about.

Name: Anonymous 2015-06-12 16:46

>>8
No it doesn't apply. Prove that the universe solves anything.

Name: Anonymous 2015-06-12 16:51

>>9
Okay, gravity would not work if the universe did not solve the n-body problem. There, done.

Name: Anonymous 2015-06-12 16:53

>>10
Wrong. /prog/ works without you having to solve any quantum physics equations or even to know about condensed body physics, energy bands, electrons, holes, phonons and their propagation.

Name: Anonymous 2015-06-12 17:02

>>11
dope my silicone implanted anus

Name: Anonymous 2016-06-06 19:52

>>11
They said the UNIVERSE solves it, not that the user does it. Running quicksort on an array works even if the values stored in the array don't know how they're being sorted. They're not even conscious!

Don't change these.
Name: Email:
Entire Thread Thread List