Snake AI
I have just finished making a snake program that allows Human vs CPU mode.
the CPU playes by following the food any ware.
how can I program it so it can trap the human player?
And how can I program it so it dont go in dedend paths?
I programmed the game by using a (2) dimentional array for the map (the area to play in) and store the indexes of the snakes on the map in
a (1) dimentional array (an array for each Snake).
Edited by - Majed on 7/18/00 7:42:35 PM
This all depends on your code, how you''ve stored your map or maze and how you store the snakes position(s). You''d have to explain a bit more.
- Ben
- Ben
__________________________Mencken's Law:"For every human problem, there is a neat, simple solution; and it's always wrong."
"Computers in the future may weigh no more than 1.5 tons."- Popular Mechanics, forecasting the relentless march of science in 1949
"Computers in the future may weigh no more than 1.5 tons."- Popular Mechanics, forecasting the relentless march of science in 1949
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement