Pac-Man Ghost AI Explained

Pac-Man Ghost AI Explained

Retro Game Mechanics Explained

4 года назад

1,372,068 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@d3vilman69
@d3vilman69 - 01.02.2024 13:45

And I thought Pac-man is a simple game(the rom is just 15kB)... didn't know it's so friggin complex!

Ответить
@trickysoft
@trickysoft - 28.01.2024 22:14

Great explanation of the artifact that I saw when writing pacman for the BBC micro. I implemented the pathfinding from a doc I found explaining it, so didn't have the overflow and always got the calculation "correct". John Studley, one of the perfect pacman players played my version and before long had found a place where you can sit and no ghosts will get you. I checked the original code and found the maths was "wrong" but have left it "as planned" in my version. Who would have thought a simple optimisation would have caused such a useful "bug". Maybe they knew, we may never know!

Ответить
@jcpartri
@jcpartri - 23.01.2024 02:59

I... love... this.... Thank you!

Ответить
@dtvjho
@dtvjho - 19.01.2024 06:23

The ghosts’ movements were refined in Ms Pacman, and nearly perfect in Jr Pacman

Ответить
@spikespike_sm4216
@spikespike_sm4216 - 13.01.2024 23:57

Great video!

Ответить
@ottolehto
@ottolehto - 02.01.2024 07:29

An amazingly well made and insightful video! Great stuff.

Ответить
@siriusunknowncicerone6549
@siriusunknowncicerone6549 - 26.12.2023 18:08

"What if I'm in a maze, based after Pac-Man? Then the ghost gang of this "crossover" will be Sue, Pinky, Spunky, and Mavis.
Why Mavis enter in play? For obvious reason: as soon as I get a Power Nugget, she's the fastest vulnerable ghost of all, rivaling that of Blinky's aggressive speed.
Ah, by the way... don't ever underestimate Sue - she's extremely aggressive."
- Sirius Unknown Cicerone

Ответить
@TechSY730
@TechSY730 - 30.11.2023 00:34

I'm curious. What is the behavior of ghosts (in any state) if they hit a dead end? Where the only non-wall direction is where they just came from.

Sure this doesn't happen in the game unmodified, but what if you forced it?

Ответить
@theAstarrr
@theAstarrr - 13.11.2023 18:24

Mrs Pac Man: How about some RNG during Scatter mode, that totally isn't super frustrating.

Ответить
@DracoVerta
@DracoVerta - 31.10.2023 20:25

Wow! This is incredible! Did you use a program to make this, or is it purely animation?

Ответить
@ddljunkygames7654
@ddljunkygames7654 - 18.10.2023 23:55

Wow and I always thought it was just pure random 😂

Ответить
@PM-James
@PM-James - 13.10.2023 22:30

Interesting, I wonder why when frightened they don't just do something similar to Inky where their target is a mirror flip of wherever Pacman and they currently are, causing them to always try to run away from him. I always thought that's what they did do but guess they're never in Frightened mode long enough to really confirm that.

Ответить
@voodooopaque6357
@voodooopaque6357 - 09.10.2023 00:26

Love how they have there own personalities

Ответить
@DisastrousKevin
@DisastrousKevin - 06.10.2023 08:30

My game design teacher made us watch this

Ответить
@perspgold8945
@perspgold8945 - 04.10.2023 18:28

Thats not AI. At all

Ответить
@nighthawk0077
@nighthawk0077 - 15.09.2023 01:12

Very well presented and produced video. In computer class way bay in the day, out final project was to create a Pac-Man style game of out own design. For the ghost AI, we were given a prepared script to handle all enemy movements. I guess at our level of coding we were not able to grasp the basics of this. Also interesting a generic script to handle this was available for distribution.

Ответить
@nighthawk0077
@nighthawk0077 - 15.09.2023 00:59

The people that came up with this back in 1980 are true pioneering genuises!

Ответить
@johneygd
@johneygd - 14.09.2023 11:34

Pretty cool clever programmingfrom those pacman designers,
Altrough in the ti99 version at difficuilty level 9, ghosts could change 180 dagree halfway trough their path depending on the position of pacman,thus making it more difficuilt to play.

Ответить
@wettuga2762
@wettuga2762 - 12.09.2023 18:01

Memorizing their movements is definitely something I will never be able to do, but knowing some patterns and blind spots is certainly helpful. Basically Blinky will always chase you from the shortest path possible, Pinky will always try to flank you, Inky might be tricked into turning away at certain intersections, and Clyde will be doing is own thing. Genious "A.I." for such an old game!

Ответить
@zoa1-99.......
@zoa1-99....... - 07.09.2023 16:33

They arn't ghosts dude!

Ответить
@Wizardof
@Wizardof - 02.09.2023 02:40

Yeah at least these AI don't call me saying they are kidnapped or ask about car warranties or read news stories bad.

Ответить
@Chris-op7yt
@Chris-op7yt - 21.08.2023 07:30

very nice

Ответить
@QQueTV
@QQueTV - 20.08.2023 19:21

do they also work this way in Ms. Pac Man?

Ответить
@CallousCoder
@CallousCoder - 16.08.2023 15:15

I never liked pacman until I hacked the game for a video two years ago to get to the kill screen.
And playing it more diligently then really made me appreciate and love the game. And not spending money unlike the early 80s you can actually learn the patterns and improve rather quickly.

Ответить
@russ7868
@russ7868 - 03.08.2023 06:39

I'm so glad you cleared that up... WHAT?

Ответить
@BrianStDenis-pj1tq
@BrianStDenis-pj1tq - 03.08.2023 01:30

So good, thanks!

Ответить
@maritoguionyo
@maritoguionyo - 01.08.2023 12:39

How about same but down

Ответить
@jimboramba
@jimboramba - 01.08.2023 08:17

I like that 1.2 million people just had to know how those ghost brains work

Ответить
@luigimaster111
@luigimaster111 - 31.07.2023 14:59

So a big crux of the movie Pixels is that the main character is really good at arcade games because he is godly at pattern recognition. But oh no! Pac-Man doesn't have a pattern, all the other arcade gakes made in the 89's but I guess Pac-Man is just pure RNG, impossible to master vecause there is no pattern!
That movie drove me crazy for that, just wanted to scream at everyone in the movie:"Of course it has a pattern, just google it or find some old strategy guide! There is a pattern the main protag is an egotistical dunce!"

Ответить
@Mitsuraga
@Mitsuraga - 30.07.2023 16:06

I've triggered the Pinky tricks through chance multiple times throughout my life, and never quite knew how that worked.

Ответить
@benjaminshiels1824
@benjaminshiels1824 - 29.07.2023 03:26

Fascinating. Very sophisticated A.I. for it's day. I wonder how th Atari version compares?!

Ответить
@shmackydoodRon
@shmackydoodRon - 18.07.2023 16:00

PacMan is very complicated chess.

Ответить
@ag2023en
@ag2023en - 18.07.2023 09:58

Imagine if someone made a new version where they fixed the up-left error and changed the ghost's pathfinding behavior slightly to make them even harder.

Such as by removing the "don't turn at intersections" rule.

Make Blinky target the tile right behind Pac-Man, so that way he always approaches from behind, complementing Pinky and Inky by chasing Pac-Man from the other side.

Make it so that when the ghosts reach their target, they immediately change to moving towards Pac-Man, and revert to their targeting if Pac-Man gets a certain distance from them.

Or make it so that Clyde's target is a vector flipped from between Pac-Man and Pinky's position, similar to Inky's system. That way, all four ghosts would attempt to trap Pac-Man from different angles, making the game much harder.

Maybe add a fifth ghost that moves completely randomly. Or a sixth ghost that just moves between the four corners.

Those two extra ghosts wouldn't be much of a threat on their on, but they could catch the player off guard.

Either by unpredictability or by the player forgeting about them.

That hypothetical version of Pac-Man would probably be so much harder. The AI might be so quick as to feel cheated or impossible.

Ответить
@ADucksOpinion
@ADucksOpinion - 17.07.2023 06:24

i turned on my retriod and tried all of this.. and it was great.. ty

Ответить
@DasHemdchen
@DasHemdchen - 16.07.2023 23:51

Ghosts notbeing able to go up from the house makes it a wonderful safe spot in the level.

Ответить
@Arcsin27
@Arcsin27 - 12.07.2023 13:59

My takeaway is blinky is aggressive, pinky is strategic, inky is a simp for blinky, and Clyde is a coward

Ответить
@mrdraw2087
@mrdraw2087 - 10.07.2023 13:57

Why was the movement of the pink ghost programmed so poorly? Or does it make the game better? Could the code be improved so the ghosts are better at chasing, for example by updating their distance-measurement function, or by adding some random noise to the target tiles or make the target tiles dependent on the other ghosts' locations?

Ответить
@Jervis-JehanYvesLaurent
@Jervis-JehanYvesLaurent - 09.07.2023 07:25

:0

Ответить
@ShoshoDupers
@ShoshoDupers - 05.07.2023 21:02

Inky: actively avoids the player
Blinky: hunts
Pinky: ambushes
Clyde: does whatever the fuck he wants

Ответить
@joerubi6249
@joerubi6249 - 28.06.2023 07:44

I never been a fan of mathematics, particularly algebra, calculus, and statistics, but the way it was incorporated into this video really shows the classic Pac-Man game into a different light. Well done!!

Ответить
@flameofthephoenix8395
@flameofthephoenix8395 - 27.06.2023 05:06

So, you could probably chase Clyde into doing circles around the bottom-left corner.

Ответить
@BryndanMeyerholtTheRealDeal
@BryndanMeyerholtTheRealDeal - 23.06.2023 21:01

I think making the up vector, [-1,-1] would help fix the up anomaly.

Ответить
@MultiDudeman
@MultiDudeman - 20.06.2023 16:14

That was awesome! something i didn't know that i needed to know, great video

Ответить
@unrellated
@unrellated - 17.06.2023 06:39

The circle that indicates how close Clyde can get before losing confidence, I think it might have been simpler to draw it around Clyde himself instead of Pac Man.

Ответить
@harrisonmoore3841
@harrisonmoore3841 - 15.06.2023 13:30

Imagine losing to Clyde

Ответить