Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Cardiovorax
Jun 5, 2011

I mean, if you're a successful actress and you go out of the house in a skirt and without underwear, knowing that paparazzi are just waiting for opportunities like this and that it has happened many times before, then there's really nobody you can blame for it but yourself.

TooMuchAbstraction posted:

Amateur game developer here. Most 3D games these days use "rigid bodies" for their physics simulations. Each one has mass and velocity, a shape (which may or may not accurately reflect the visuals; the shape typically is composed of one or more convex shapes like boxes, capsules, and spheres), and perhaps attributes like bounce elasticity (how much energy is lost in a collision) and friction and so on. When two rigid bodies intersect, the game will calculate the energy of the collision based on their velocities, masses, and the degree of intersection, and then attempt to force the two apart again. However, there isn't necessarily any effort made to ensure that the energy in a system is conserved -- that expulsion force can cause there to be more energy in the system than there was before the collision. If it also then doesn't actually succeed in removing the intersection between the two rigid bodies (perhaps because it removed the intersection in one area but added a different intersection in another area), then on the following frame even more energy is added to attempt to remove the collision...
Sounds pretty much like how I thought it worked, then. Thanks for confirming.

Adbot
ADBOT LOVES YOU

LifeSunDeath
Jan 4, 2007

still gay rights and smoke weed every day

TooMuchAbstraction posted:

Amateur game developer here. Most 3D games these days use "rigid bodies" for their physics simulations. Each one has mass and velocity, a shape (which may or may not accurately reflect the visuals; the shape typically is composed of one or more convex shapes like boxes, capsules, and spheres), and perhaps attributes like bounce elasticity (how much energy is lost in a collision) and friction and so on. When two rigid bodies intersect, the game will calculate the energy of the collision based on their velocities, masses, and the degree of intersection, and then attempt to force the two apart again. However, there isn't necessarily any effort made to ensure that the energy in a system is conserved -- that expulsion force can cause there to be more energy in the system than there was before the collision. If it also then doesn't actually succeed in removing the intersection between the two rigid bodies (perhaps because it removed the intersection in one area but added a different intersection in another area), then on the following frame even more energy is added to attempt to remove the collision...

You have to also couple this with the fact that the physics engine is expensive to run, so it doesn't usually update every frame. A 60FPS game might only have a 30FPS or 20FPS physics engine; the frames without physics updates draw things at their predicted locations based on their velocities and how much time has passed since the last update. But the less frequently the physics engine runs, and the faster things can move, the more they can get embedded in each other before the physics engine has a chance to notice and try to expel them.

Videogame physics works best with slow-moving objects, and the faster things go, the more likely they are to need to cheat somehow. Bullets are not physics objects, for example. Even in games that simulate projectile travel time, ballistic drop, etc. they're much too fast for the physics engine to reliably detect when they hit something.

Thanks for the writeup. My dumb rear end sees game glitches and just goes "why can't they just not let objects clip into each other, problem solved" but I know from experience, it's way more complicated than that, and lots of things have to clip together to make it look right, so weird things happen sometimes.

Good news is I love game glitches!

lord funk
Feb 16, 2004

I teach classes in drawing and animation with code. When we get to the class where a circle 'bounces' off of the edge of the screen to change direction, it's fun to make the students figure out how.

"Just check to see if it's passed the edge, then reverse the velocity!"

circle hits the edge and then gets stuck flipping its position in and out of the detection area

"Oh. Ohhhhhh that's why the Skate 3 glitch videos exist."

rodbeard
Jul 21, 2005

I'm glad my eyesight is lovely enough that I don't need to run games higher than 30 fps

Cardiovorax
Jun 5, 2011

I mean, if you're a successful actress and you go out of the house in a skirt and without underwear, knowing that paparazzi are just waiting for opportunities like this and that it has happened many times before, then there's really nobody you can blame for it but yourself.

lord funk posted:

I teach classes in drawing and animation with code. When we get to the class where a circle 'bounces' off of the edge of the screen to change direction, it's fun to make the students figure out how.

"Just check to see if it's passed the edge, then reverse the velocity!"

circle hits the edge and then gets stuck flipping its position in and out of the detection area

"Oh. Ohhhhhh that's why the Skate 3 glitch videos exist."
Got any funny stories? What's the weirdest accidental behaviour one of your students somehow managed to make an object do?

haveblue
Aug 15, 2005



Toilet Rascal
Remember that computers do not have intuition or common sense, they will only do exactly what you tell them and you need to explicitly tell them absolutely everything down to the smallest detail. This is something that it's hard for humans to wrap their brains around at every level of programming experience which is why you still get weird glitches even in AAA projects by large teams of veterans.

lord funk
Feb 16, 2004

Cardiovorax posted:

Got any funny stories? What's the weirdest accidental behaviour one of your students somehow managed to make an object do?

Not really. It's a very introductory course (99% of the students have never written code before). So it's a lot of drawing circles and squares.

There are some great moments, though. Students don't really get 'optimization' yet (they've barely learned what a loop is). So they might have thousands of objects checking every pixel on the screen each frame, and it runs like a slideshow. Cleaning that up with them and then seeing their reaction when it runs at 60fps is always a treat.

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe

LifeSunDeath posted:

Thanks for the writeup. My dumb rear end sees game glitches and just goes "why can't they just not let objects clip into each other, problem solved" but I know from experience, it's way more complicated than that, and lots of things have to clip together to make it look right, so weird things happen sometimes.

Good news is I love game glitches!

Yeah, things clipping is...I wouldn't say it's unavoidable, but you're sharply limited on what you can do if you make it a rule that things are never allowed to intersect. The underlying issue for a lot of this is that game time isn't continuous, but occurs in (typically) 1/60th of a second increments. Consequently, game physics doesn't actually move objects around, it teleports them. On one frame you're at X position, on the next you're at X+1 position, without having occupied any of the space in-between. If there's a wall at X+.5 then whoops, you're slightly embedded into it.

It's possible to avoid this, but it's expensive and complicated. Let's say your object is a box. That means that each frame, the game checks a rectangular shape to see if it's overlapping something. What you can do instead is "sweep" the box along its movement vector, for a length equal to the amount of distance the box moves each frame. This creates a new shape that covers all of the space the box would occupy during its movement, if time were continuous. You can then blap that shape down and check for collisions, and if you find one, do a bunch of math to figure out exactly when "during" that frame the collision occurred, and stop the box just short of collision.

Similar swept collision detection also exists for 3D games (Unity has them for boxes, spheres, and capsules, for example). The problem is that they're sufficiently expensive that nobody I know of uses swept collision detection for standard physics behaviors. Instead they're reserved for things like "is there enough land in front of this unit for it to keep walking forward" -- stuff where if you just did a raycast (draw a line from point A to point B) you might get false positives.

Cardiovorax
Jun 5, 2011

I mean, if you're a successful actress and you go out of the house in a skirt and without underwear, knowing that paparazzi are just waiting for opportunities like this and that it has happened many times before, then there's really nobody you can blame for it but yourself.

TooMuchAbstraction posted:

Yeah, things clipping is...I wouldn't say it's unavoidable, but you're sharply limited on what you can do if you make it a rule that things are never allowed to intersect. The underlying issue for a lot of this is that game time isn't continuous, but occurs in (typically) 1/60th of a second increments. Consequently, game physics doesn't actually move objects around, it teleports them. On one frame you're at X position, on the next you're at X+1 position, without having occupied any of the space in-between. If there's a wall at X+.5 then whoops, you're slightly embedded into it.
And when your framerate doesn't match up with the update rate the physics engine expects, that's when the really weird poo poo happens.

Tunicate
May 15, 2012

haveblue posted:

Remember that computers do not have intuition or common sense, they will only do exactly what you tell them and you need to explicitly tell them absolutely everything down to the smallest detail. This is something that it's hard for humans to wrap their brains around at every level of programming experience which is why you still get weird glitches even in AAA projects by large teams of veterans.

except neural nets, which in addition to lacking intuition or common sense, are also impossible to give explicit instructions to.

Kikas
Oct 30, 2012

Cardiovorax posted:

And when your framerate doesn't match up with the update rate the physics engine expects, that's when the really weird poo poo happens.

Then you know you are in a Bethesda game.

Cardiovorax
Jun 5, 2011

I mean, if you're a successful actress and you go out of the house in a skirt and without underwear, knowing that paparazzi are just waiting for opportunities like this and that it has happened many times before, then there's really nobody you can blame for it but yourself.
Neural networks are very intuitive, which is why they tend to learn the completely wrong things anytime you leave their own devices. They're the digitalized essence of "that sounds about right-ish, let's go with that" as someone's basic attitude to life.

Cardiovorax has a new favorite as of 20:08 on Jun 7, 2020

The Cheshire Cat
Jun 10, 2008

Fun Shoe

Tunicate posted:

except neural nets, which in addition to lacking intuition or common sense, are also impossible to give explicit instructions to.

The fun thing about Neural Nets is how they are impossible to debug not just because they are extremely complicated systems that develop themselves in a way that is not comprehensible to humans, but also because if you try to force a particular behaviour without adjusting your training/reward mechanism somehow, they have a habit of just evolving to completely bypass the hard coded behaviour because it sees it as less efficient. So basically any time you want a NN to change its behaviour, you have to retrain it from scratch and just hope it evolves it organically.

The Cheshire Cat has a new favorite as of 21:06 on Jun 7, 2020

SubNat
Nov 27, 2008


And let's not forget that you need to randomize input and box them in with rules in regards to how they're allowed to act.
Otherwise you'll get stuff like the machine that had a 100% detection rate of.. I believe it was poisonous mushrooms. Not because it had learned to recognize them, but because it recognized that the dataset wasn't randomized, so it knew the odd ones were safe, and the even numbered ones were dangerous.

I remember it from a fun excel list I saw once, where there was an overview of various machine learning examples where the machines did out-of-the-box solutions such as that. A pretty useful resources for what -not- to do when setting up training examples.

The Cheshire Cat
Jun 10, 2008

Fun Shoe

SubNat posted:

And let's not forget that you need to randomize input and box them in with rules in regards to how they're allowed to act.
Otherwise you'll get stuff like the machine that had a 100% detection rate of.. I believe it was poisonous mushrooms. Not because it had learned to recognize them, but because it recognized that the dataset wasn't randomized, so it knew the odd ones were safe, and the even numbered ones were dangerous.

I remember it from a fun excel list I saw once, where there was an overview of various machine learning examples where the machines did out-of-the-box solutions such as that. A pretty useful resources for what -not- to do when setting up training examples.

Yeah, which is pretty funny because it basically boils right back down to the original statement:

haveblue posted:

Remember that computers do not have intuition or common sense, they will only do exactly what you tell them and you need to explicitly tell them absolutely everything down to the smallest detail.

just with a bunch of extra steps thrown in the middle.

Tunicate
May 15, 2012

you don't have to explicitly tell them anything

you have to implicitly tell them everything

Zore
Sep 21, 2010
willfully illiterate, aggressively miserable sourpuss whose sole raison d’etre is to put other people down for liking the wrong things

SubNat posted:

And let's not forget that you need to randomize input and box them in with rules in regards to how they're allowed to act.
Otherwise you'll get stuff like the machine that had a 100% detection rate of.. I believe it was poisonous mushrooms. Not because it had learned to recognize them, but because it recognized that the dataset wasn't randomized, so it knew the odd ones were safe, and the even numbered ones were dangerous.

I remember it from a fun excel list I saw once, where there was an overview of various machine learning examples where the machines did out-of-the-box solutions such as that. A pretty useful resources for what -not- to do when setting up training examples.

Yeah my favorite from that list was the one they were trying to train to detect cancerous moles, so it learned that pictures where a mole next to a ruler were cancerous and the ones where they were not weren't.

Elfface
Nov 14, 2010

Da-na-na-na-na-na-na
IRON JONAH
There were a few that found very 'gordian knot' solutions. Like being tasked to sort lists, and deleting entries that didnt fit, because it's faster than moving them about.

haveblue
Aug 15, 2005



Toilet Rascal
This is the list, I think:

https://docs.google.com/spreadsheets/u/1/d/e/2PACX-1vRPiprOaC3HsCf5Tuum8bRfzYUiKLRqJmbOoC-32JorNdfyTiRRsR7Ea5eWtvsWzuxo8bjOxCG84dAg/pubhtml

My favorite one I don't think is in the list- they used machine learning to design a chip to do a task, only to wind up with a chip that depended on the EM interference from garbage in seemingly unused parts of the die.

Also:

quote:

Creatures exploit a collision detection bug to get free energy by clapping body parts together

Help I'm trying to train creatures to evolve a survival strategy but they're dummy thicc

Tunicate
May 15, 2012

Elfface posted:

There were a few that found very 'gordian knot' solutions. Like being tasked to sort lists, and deleting entries that didnt fit, because it's faster than moving them about.

nah that was too difficult, it just deleted the whole list because an empty list has no entries out of order

Tunicate has a new favorite as of 22:33 on Jun 7, 2020

Cardiovorax
Jun 5, 2011

I mean, if you're a successful actress and you go out of the house in a skirt and without underwear, knowing that paparazzi are just waiting for opportunities like this and that it has happened many times before, then there's really nobody you can blame for it but yourself.
Well, it's a perfectly valid solution to the problem, if no one remembers to specify that all the entries still have to be there afterwards. :v:

SubNat
Nov 27, 2008

haveblue posted:

My favorite one I don't think is in the list- they used machine learning to design a chip to do a task, only to wind up with a chip that depended on the EM interference from garbage in seemingly unused parts of the die.

Yeah, probably since that was more evolutionary design in the pre-machine-learning-hype days.
Or 'evolvable hardware.' even though it was the design that went through evolving iterations, as opposed to the hardware itself.

I believe I know of the case you're referring to, where they used a tiny 10x10 FPGA way too simple to do the task in conventional ways, to see what design the computer could magic up after a couple thousand iterations.
And it began using unconnected gates to manipulate nearby ones, by reading off the slight signal changes due to the intereference. Meaning that while the grid was 10x10, it could connect and run logic disconnected from the grid layout, thus increasing the complexity of tasks it could do.

drat Interesting article which is probably where a lot of people heard about it: https://www.damninteresting.com/on-the-origin-of-circuits/
study: http://citeseerx.ist.psu.edu/viewdoc/download;jsessionid=6691182CC83AE8577D7C44EB9D847DA1?doi=10.1.1.50.9691&rep=rep1&type=pdf
The whole 'evolutionary iteration' design thing was a pretty interesting blip, but it seems like it mostly got swallowed up under the general machine learning umbrella.

SubNat has a new favorite as of 23:10 on Jun 7, 2020

dialhforhero
Apr 3, 2008
Am I 🧑‍🏫 out of touch🤔? No🧐, it's the children👶 who are wrong🤷🏼‍♂️
Sounds like neural nets are a lot like children.

flatluigi
Apr 23, 2008

here come the planes

dialhforhero posted:

Sounds like neural nets are a lot like children.

nah, these days they spend a lot of money on supporting the future of machine learning

ToxicFrog
Apr 26, 2008


haveblue posted:

My favorite one I don't think is in the list- they used machine learning to design a chip to do a task, only to wind up with a chip that depended on the EM interference from garbage in seemingly unused parts of the die.

There was another one (possibly from the same list) where the chip evolved without an oscillator, but was still clocked -- turned out one of the random greebles sticking off the side functioned as an antenna to pick up an oscillating radio tone from elsewhere in the lab. If you took it out of the room it stopped working.

moist turtleneck
Jul 17, 2003

Represent.



Dinosaur Gum
I've been having fun experiencing the path finding in mafia 3

In most games they just tell you to eat poo poo if the ai cant find a path to get you into the car but by god Lincoln Clay is determined as hell


https://i.imgur.com/FN7xAT5.gifv
https://i.imgur.com/HXWqlYH.gifv

Captain Hygiene
Sep 17, 2007

You mess with the crabbo...




:aaaaa:

Lobok
Jul 13, 2006

Say Watt?

He's just making little exercise goals for the day. Before you open the fridge, do ten squats. Before you get dressed, do ten pushups. Before you get in the car, run around the building and steamroll anyone who dares get in your way.

SubponticatePoster
Aug 9, 2004

Every day takes figurin' out all over again how to fuckin' live.
Slippery Tilde

moist turtleneck posted:

I've been having fun experiencing the path finding in mafia 3

In most games they just tell you to eat poo poo if the ai cant find a path to get you into the car but by god Lincoln Clay is determined as hell


https://i.imgur.com/FN7xAT5.gifv
https://i.imgur.com/HXWqlYH.gifv
I've been having fun (sometimes) with the AI in Mafia 3. I'll kill a dude off by himself with a silenced gun, and somehow some rear end in a top hat on the other side of the map "sees" it and puts the whole area on alert. This has happened through walls, floors, ceilings, etc. And no matter where I am on the map they will always make a beeline to me. It does get hilarious when they come in a slow conga line and I just kill them from around the corner one after the other and end up with a huge pile of bodies in a stairwell or whatnot.

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe

SubponticatePoster posted:

I've been having fun (sometimes) with the AI in Mafia 3. I'll kill a dude off by himself with a silenced gun, and somehow some rear end in a top hat on the other side of the map "sees" it and puts the whole area on alert. This has happened through walls, floors, ceilings, etc. And no matter where I am on the map they will always make a beeline to me. It does get hilarious when they come in a slow conga line and I just kill them from around the corner one after the other and end up with a huge pile of bodies in a stairwell or whatnot.

Reminds me of playing a Splinter Cell game (I forget which, the one where Sam starts out as a civilian and gradually acquires his old kit over the course of the game). There's a bit with a well that comes out in the middle of a large open area with a fair number of guards wandering around. One of your ways to kill enemies is to lure them into poking their heads over an area where you're hanging, and you just grab them with one hand and yank them down to their deaths. I piled up at least a half-dozen guards at the bottom of that well.

IShallRiseAgain
Sep 12, 2008

Well ain't that precious?

When you get a high enough level of stealth in Vampire the Masquerade the Bloodlines, the game completely breaks and enemies won't detect you even if you are right in front of them. The final area also has infinitely spawning enemies that rappel down from a helicopter, so you can just endlessly kill them, generating a huge pile of corpses.

Captain Hygiene
Sep 17, 2007

You mess with the crabbo...



I prefer the MGS approach of using infinite tranq ammo to create large piles of enemies enjoying a peaceful nap :unsmith:

SubponticatePoster
Aug 9, 2004

Every day takes figurin' out all over again how to fuckin' live.
Slippery Tilde
There's also the elevator of death in Blood Money, where you can get up on top of the car and just murder people indefinitely. Not a glitch though.

Mierenneuker
Apr 28, 2010


We're all going to experience changes in our life but only the best of us will qualify for front row seats.

IShallRiseAgain posted:

When you get a high enough level of stealth in Vampire the Masquerade the Bloodlines, the game completely breaks and enemies won't detect you even if you are right in front of them. The final area also has infinitely spawning enemies that rappel down from a helicopter, so you can just endlessly kill them, generating a huge pile of corpses.

Also see: Alpha Protocol.

Philippe
Aug 9, 2013

(she/her)

Captain Hygiene posted:

I prefer the MGS approach of using infinite tranq ammo to create large piles of enemies enjoying a peaceful nap :unsmith:

When I play Dishonored, there's usually a dumpster called Naptime.

Kennel
May 1, 2008

BAWWW-UNH!

SubponticatePoster posted:

I've been having fun (sometimes) with the AI in Mafia 3. I'll kill a dude off by himself with a silenced gun, and somehow some rear end in a top hat on the other side of the map "sees" it and puts the whole area on alert. This has happened through walls, floors, ceilings, etc. And no matter where I am on the map they will always make a beeline to me. It does get hilarious when they come in a slow conga line and I just kill them from around the corner one after the other and end up with a huge pile of bodies in a stairwell or whatnot.
Demonstration:
https://i.imgur.com/a73gwki.mp4

cage-free egghead
Mar 8, 2004
NoClip did a neat video on Dwarf Fortress

https://www.youtube.com/watch?v=VAhHkJQ3KgY

skooma512
Feb 8, 2012

You couldn't grok my race car, but you dug the roadside blur.

Kennel posted:

Copied from the Steam thread. Actually badly thought virtual economy rather than a proper glitch, but fits here nicely:

Video games once again helping prove that Capitalism is horrible.
[/quote]

The tendency of the rate of return to fall to zero

MadDogMike
Apr 9, 2008

Cute but fanged

Captain Hygiene posted:

I prefer the MGS approach of using infinite tranq ammo to create large piles of enemies enjoying a peaceful nap :unsmith:

Some men just want to watch the world snore.

Adbot
ADBOT LOVES YOU

Suleman
Sep 4, 2011

IShallRiseAgain posted:

When you get a high enough level of stealth in Vampire the Masquerade the Bloodlines, the game completely breaks and enemies won't detect you even if you are right in front of them. The final area also has infinitely spawning enemies that rappel down from a helicopter, so you can just endlessly kill them, generating a huge pile of corpses.

This reminds me of Rainbow Six Vegas 2's "Terrorist Hunt" mode, where enemies will start swarming on your position when they hear a gunshot. So, the optimal strategy is often just finding a chokepoint, firing your gun once, setting the sights at head height and just headshotting everyone with a single mouse click when they approach your position with no regard to the growing pile of corpses.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply