-
Couldn't load subscription status.
- Fork 37
AI Concepts
This page is more a reminder for myself and maybe an inspiration for other dudes writing an ai for tuurn based games like Advance Wars.
Matrix containing indexes for each island for a movementtype. An island contains all terrains the unit with the given movementtype can reach on it's on. For example a tank can not cross sea so his island is seperated by it, while a fighter can move over it. So the fighter island differs from a tank island. An Island can also be the sea area for a ship. In the matrix -1 represents a none crossable field while indexes with the same number represent the same island. Island Maps represent a fast way to calculate if a unit can reach another one without the need to fully expand a search algorithm like A*. Commander Wars uses them to find relativ fast units which need a transporter e.g. a lander to get to the enemy or a building.
Commander Wars restarts and checks all actions from scratch while using an order like capturing -> attack with indirects -> attack with directs. The advantage is a more flexible ai based on changes on the map due to unit movement. The disadvantage is a way higher computionnal overhead if multiple units don't fit into the earlier task groups.
Commander Wars uses an a*-algorithm as base and modifies it to a dijkstra algorithm for finding the closest task upon all possible tasks for a unit. The ai basically gets all atttackable units, transporters or buildings and finds the closest one with a dijkstra algorithm and moves toward that target.
#Decision trees and Score functions vs neural networks Commander Wars uses self learning decision trees for several task like detecting if a co-power should be used. The advantage is it can be easily enhanced by a modder or a programmer. The disadvante is a pretty fixed behviour with less varity in general. Eventhough CoW uses a random decision generator if multiple options are avaible for the final leaf. A scoring function overs more flexibility like the one for the normal ai for building units or co-units. Since multiple inputs can be used to be balanced and and added with different conditions. But they are much harder to implement and balance the different factors. Like the 14-Inputs for building a unit. However they are still a white box model of what the ai does. Neural-Networks would be a nice addition to use but they require a lot more engineering and initial overhead to make them run. So i skipped them for the start.
E-Mail-Contact: commanderwars@gmx.de ask for help here. :)