gia-guar / World-of-Tanks-drive-assistant

Minimap based autopilot for training in world of tanks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

World-of-Tanks-drive-assistant

maxresdefault world of tanks UI

World of Tanks is a free MMo where you are driving the most iconic tanks in the history. Here I propose a project providing an automatic driving assistant powered by a deep CNN which take a look at the minimap and drives the tank towards the placeholder.

387de88a-520f-11ed-88e2-64bc580216eb

The idea is pretty simple:

  1. Capture gameplay (frames and keys) (capture_frames.py)
  2. Train an end-to-end CNN to take frames as inputs and returns commands as outputs (TF_pipeline_wot)
  3. Use the Model to command a tank in real time (Play.py)

While the idea was simple I soon encountered many challenges:

  • capture multiple keys at the same time
  • converting .txt files in hot-one encoded labels and making the y dataset
  • class imbalances (fixed with data augmentation and balancing scripts). These solutions are the best I could came up with but 'unfortunately' they require much gameplay to be collected

problems and how to solve them:

  • capture the EXACT minimap square. with some tries can be done but remember to adjust the pipeline process
  • the model requires a lot of positive examples (5 - 6 000 pairs) to perform nicely;
  • many hyper parameters to be chosen that affect training process and control experience. The learning rate was set at 1e-5 but some in some iterations the model could not learn; while controlling the tank the output
  • the actual model deployment it's not smooth since you'll need to play WoT in a windowed mode. This is due some incompatibility with Thread processes. In theory the problem could be solved by NOT using thread at all baut this would require re-writing most of the code with different modules and functions
  • it's not a Reinforcement Learning approach which is the best approach for agent-control problems (but the game is complex and it would require much more training) but it's on the to-do list ;)

About

Minimap based autopilot for training in world of tanks


Languages

Language:Jupyter Notebook 98.4%Language:Python 1.6%