Jump to content

Solving the "Ghost and GhostBusters" problem


pat
 Share

Recommended Posts

Hello all,

 

I wrote a program in Phaser that resolves the problem with "Ghosts and GhostBusters" using the Graham algorithm.

 

 

 

A group of n Ghostbusters is battling n ghosts. Each Ghostbuster is armed with a proton pack, which shoots a stream at a ghost, eradicating it. A stream goes in a straight line and terminates when it hits the ghost. The Ghostbusters decide upon the following strategy. They will pair off with the ghosts, forming n Ghostbuster-ghost pairs, and then simultaneously each Ghostbuster will shoot a stream at his or her chosen ghost. As we all know, it is very dangerous to let streams cross, and so the Ghostbusters must choose pairings for which no streams will cross.

Have a look here

 

Have a nice day

 

Patrick

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...