The triumph of the technology otaku: a study of the action pattern of the Pac-Man game Ghost

Source: Internet
Author: User
Keywords Triumph individuality come out cannot triumph individuality come out cannot
Tags behavior change design direction game ghost ghosts personality
Canadian programmer Chad Birch in the "Understanding PAC Ghost Behavior" this paper discussed in detail in the Pac-Man game Ghosts of the mode of action, here simply: Overall, the ghost of artificial intelligence design is very simple, To a grid to consider where to go next, only one step at a time. In addition, the procedural rules can not go back, that is, can not immediately return to the last lattice-only in the ghost change mode, the ghost will change direction immediately go backwards, to remind the player Ghost change mode.  In addition, in the "Fear" mode (the ghost becomes blue after eating the big beans), the ghost does not change direction, because turning blue is enough to remind the player. "Decentralized" mode scatter in this model, each ghost has a program to set the target lattice.  But because the target grid is outside the actual path, and ghosts can't go back, if you stop in scatter mode, they go around the diagram path all the time. The different personalities of ghosts are red: Blinky literally means "blink of an art"; Personality is "chasing". After the game is always the first to come out, straight after eating beans people. In the dispersion mode the speed will increase.  When calculating the path, the target is located in the square where the current Pac-Man is located. Pink: Pinky, Personality is "fu".  Move in the direction of the bean-eating man, ambush. Blue: Inky, personality "eccentric".  After eating beans people eat 30 beans before coming out, in the calculation of the path will also consider the people who eat beans and red ghosts of the movement-first of all, to calculate the current 2 square beans, and then from the position of the Red Ghost to the lattice as a vector, the vector twice times the position is its current target lattice. Orange: Clyde, personality "camouflage". It's always the last one to come out (after one-third of the beans are eaten before the first pass). Like to pretend that it is walking on its own way completely does not hang you, because according to it and the bean-eating people's distance, it will be in two different modes of action conversion. If it and the bean-eating person's distance is greater than 8 lattice, it and the Red ghost will eat the bean person's current lattice as the target; once close to the bean-eating 8 cells, as in the dispersion mode, go to the lower left corner. So, as long as you are not in the way of the "Go Home", you can avoid it completely. (Digging the shell net) more game information, play the game net more.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.