ScratchData LogoScratchData
Back to gtoal's profile

Evade the minotaur!

GTgtoal•Created March 30, 2015
Evade the minotaur!
4
3
374 views
View on Scratch

Instructions

I built an AI Minotaur for @OkagrenumJB ( https://scratch.mit.edu/discuss/topic/101258/ ) to see how it would play out, and my conclusion is that if the AI is written properly, it would be too effective and would always manage to catch our hero, Theseus. Something will need to be done to make it less effective and give the player a chance. One simple solution is to add extra passages to the maze, which will make it easier to solve but will also allow for an escape route to avoid the Minotaur. Another cheap solution is to only let the Minotaur move on every second move of the player, so that the player is twice as fast... The best solution would be to place the Minotaur somewhere far enough away from the optimal player path than you can get to the exit before it - as long as you never make a wrong move or hesitate... this would require running the pathfinding algorithm using every point on Theseus' path as a starting point and eliminating squares that are too close, from the set of possible Minotaur starting points... quite a lot of coding needed...

Description

I rewrote the maze code - it needs a data structure - can't just work graphically by sprite sensing. (Incidentally the AI here is the critical part of the algorithm I was suggesting to someone recently for use with the ghosts in Pacman... https://scratch.mit.edu/discuss/topic/45696/ ) There's a bug in the AI; sometimes it doesn't chase Theseus when he is on the bottom row (Y=0). And very occasionally the Minotaur jumps outside the maze when it is on the right hand wall (X=0)... Not worth fixing for this demo.

Project Details

Project ID55115332
CreatedMarch 30, 2015
Last ModifiedApril 11, 2015
SharedMarch 30, 2015
Visibilityvisible
CommentsAllowed

Remix Information

Parent ProjectView Parent
Root ProjectView Root