-
Notifications
You must be signed in to change notification settings - Fork 33
How to training the normal ai
Robosturm edited this page Aug 24, 2023
·
1 revision
- Setup get the training script https://github.com/Robosturm/Commander_Wars/blob/master/ai/training/normalai_training.js
- Rename it to init.js and copy it to the exe folder
- Change the value "cores = 30, // amount of games started at the same time" in the script to how many cpu's you want to use for the training process
- Uncomment or comment the line "menu.createRandomInis(2, "resources/aidata/normal/normal", 16);" depending if you want to continue a training session or start a new one.
- Change the values at the start of the script under "// training setup data" to on what environment you want to train the ai. Note the map should be a 2 player pvp map.
- Optional enable the debug output for the game in order to track what is going on in the background
- Start the game
- The game generates if enabled random ai-ini values for 8 ai's
- The game let's each ai fight against each other on both positions of the map and gives a score of 0, 1 or 3 depending on the match result for each match
- Once every ai fought against each other the best 2 ai's are kept as survivors.
- New 6 ai ini values are generated either random ones or progressed ones based on the match results
- Repeat from step 2
- Stop at anytime you want and check the console.log for the line "Best selected ai's are: ". You can rename the best file to normal.ini and test it or provide it to the CoW project via an issue if the results are good
E-Mail-Contact: commanderwars@gmx.de ask for help here. :)