-2

I am making a car racing game in THREE.js. I want to ask that how can I put Artificial Intelligence in enemies so that they can search for the player and hit the player. what sort of algorithms are used for AI in games and in what fashion.

Najam-us-Saqib
  • 526
  • 3
  • 10
  • 23
  • 1
    All sorts of AI are used in games, everything from intelligent to dumb algorithms. Your question is too broad to be answered. – Bergi Jan 20 '13 at 09:29
  • StackOverflow is meant for practical answerable questions (in simple words) - [FAQ](http://stackoverflow.com/faq). – Lion Jan 20 '13 at 09:41

1 Answers1

2

search is a broad theme: see if A* could fit your request.

Here a detailed page about implementing it in JavaScript

CapelliC
  • 59,646
  • 5
  • 47
  • 90
  • I'm very sure that the OP's "search" did not refer to "graph search" – Bergi Jan 20 '13 at 10:00
  • well, there is a chance he placed cars on a grid, then the linked page could help, or at least, would help to enrich his background culture... – CapelliC Jan 20 '13 at 10:06