shadowcomer / CatLing

Starcraft AI
2 stars 1 forks source link

Define how resources such as units will be requested #24

Open shadowcomer opened 8 years ago

shadowcomer commented 8 years ago

Because BehaviorTrees, when built, define exactly how and what is required, some problems arise. For example, when units are needed, the current implementation forces us to know what is needed beforehand, which can't be known at the time the tree is built.

A possible solution is having tasks that are capable of selecting units through the given function, and then store the unit inside a particular slab. Then, the task that will use it, can retrieve the units from that same slab.

Edit1: typo.

shadowcomer commented 8 years ago

A good approach would be to have a Knowledge Base/ResourceManager that implements different interfaces, each module having different accesses to it.

The advantage of this approach would be a centralized implementation of resources, also being able to change the implementation without changing the interface.

A possible disadvantage is the bottleneck of information, though this problem could be palliated through the use of a better implementation, completely transparent to the user.