hatfield-c / rotkr

Rats! Of the Kar Re-Bein by Katin Games
0 stars 0 forks source link

[ROTKR-40] Flush out AI system #40

Closed hatfield-c closed 4 years ago

hatfield-c commented 4 years ago

Now that ships can move and shoot, there will need to be an AI to control said ships. However, research will need to be done on the best method of implementing this AI, as there are likely far more elegant solutions than just hardcoding behavior.

hatfield-c commented 4 years ago

Thus far, there are two potential implementations we could take:

hatfield-c commented 4 years ago

I've been exploring ML some more, and I am becoming more convinced that it's the way for us to go. It is quite robust, reasonably fast, and the performance hit thus far has been negligible. I will need to experiment more with it while trying to perform more complex behaviors, however presently I am quite pleased with the result.

hatfield-c commented 4 years ago

A simple machine learning neural network has been finalized, where a customized prefab of the Waso Moli shoots at a stationary target.

It is by no means perfect, however it illustrates a simple proof of concept. You can find the scene which implements this functionality under Assets/Scenes/Playground/ML-Shoot.unity

hatfield-c commented 4 years ago

I have completed work on a neural network movement test, where a NN takes control of the waso moli agent, and pilots it into a designated box.

The final neural network works every time, and pilots the ship directly into the box, and holds it there, even if it is a bit slow. However, this is encouraging, as the act of setting up these test scenes have confirmed the efficacy of neural networks as a means to control the AI.

The primary challenges with this approach, seem to be less about performance, and more about properly setting up the learning environment. I am worried that trying to use the game Wye's directly in the learning process will prove too complex or inefficient, given their custom logic linked to the game. I am also concerned however, that if we attempt to create realistic simulations, then we will need to update said simulations every time we update the Wye.

More work will need to be done on the machine learning algorithms. We will need to decide on certain architecture implementations, such as:

However, I remain steadfast in my confidence that this is the right direction to move in, and I am excited to see what will come of it.

hatfield-c commented 4 years ago

This issue has been adequately explored, and thus it will be closed.