# Simple RTS AI

This topic is 4100 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I'm programming a Multiplayer Tower Defense game. You have a base and you can buld and upgrade towers (shoots incoming enemy units) and barracs (sends units to a enemy base of your election). Now I just pretend to implement a deathmatch mode. I've got no problems doing pathfinding AI and those minor thinks, but if I want a player be controled for AI I'll need somethink more sofisticated. The think is that it is one of the last thinks I want to implement, but in the meantime I'll need some REALLY SIMPLE AI to "debug" the game while I'm adding features. Wich is the best way to do this. Building towers and barracs just randomly seems like... ugly xDDDD Oh, and a decent AI for these game how will look like (I'm planing some fuzzy logic, I understand the basics but I hadn't still implemented anythink. You see why I need a simple AI before? xDD)

##### Share on other sites
I would apply Floyd-Warshall to compute the maximum flow from the creep entry to the creep exit, then try to place a building as close to points of maximum (blocked) flow without actually blocking it. For the choice of tower, I would probably choose the one which provides the highest damage-per second times the amount of flow through the range of that tower.

##### Share on other sites
I googled Floyd-Warshall and it's a shorteth path algorithm for all nodes (Or somethink alike). You would place the buildings (wich trow units to the enemy base) in the node with less cost? What do you mean with flow?

##### Share on other sites
Argh, forgive the mixup. I did not mean 'Floyd-Warshall' but rather 'Ford-Fulkerson'.

1. 1
2. 2
Rutin
21
3. 3
4. 4
A4L
15
5. 5
khawk
14

• 13
• 26
• 10
• 11
• 9
• ### Forum Statistics

• Total Topics
633737
• Total Posts
3013607
×