Hacker News new | comments | show | ask | jobs | submit login

Most of the work needed for decisions is shared between AI instances using a few tricks:

1. Precomputing information for all agents, like using global shortest path (Bellman-Ford).

2. Abandoning per-unit subjectivity (a lot of units will share same view) or in other words: limiting internal unit state, using a shared state between groups of units.

3. Decoupling expensive algorithms into multiple simple steps. (Like state machine simplifies regular expression.)

4. Using separate AI and visualization thread, and using low amortized cost data structures (priority queues etc.).

You may observe all these three rules by anomalies in unit behaviour. Play http://www.screeps.com to learn a lot about modern RTS AIs :-).

For an online game, an additional trick could be to run the AI code on the users' computers.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact