Jump to content

AI Programming?


steelmanronald06

Recommended Posts

I've used some simple AI for games before the easiest that I know of is this

if(x1>x2) x1--;
else
if(x1<x2) x2++;

if(y1>y2) y1--;
else
if(y1<y2) y1++l

that code will make something "chase" something else. I remember I got this code from a good C programming website: http://www.cprogramming.com/tutorial.html#aitutorial

Link to comment
https://forums.phpfreaks.com/topic/41904-ai-programming/#findComment-203213
Share on other sites

I wrote an A.I. program to simulate a refrigerator that suggested a weekly grocery list based on what was purchased the week before and how heavily the fridge had been used during the current week.

 

The most I could recommend is the books we used for the course but IMO they weren't that great.

Link to comment
https://forums.phpfreaks.com/topic/41904-ai-programming/#findComment-203223
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.