Topic: Improving the AI
hessenfarmer![]() |
Posted at:
2020-04-25, 19:39 UTC+2.0
I fully agree to both teppo and Tibor. The map specific trained AI might give us the last 10% when our basic AI environment is stable and reasonably bug free. However it might need tribe specific training as well. And as long as we don't have sufficient fitness function to chose the next gen auto training isn't possible. ![]() ![]() |
JanO![]() |
Posted at:
2020-04-25, 21:47 UTC+2.0
C++, in theory I should be able to read some basics. That's about 10 years ago without any repetition Actually, my suggestions were not meant to be anything like map-specific. Those military considerations seem very basic to me. Map-specific is more applicable to economic decisions, I guess. ![]() ![]() |
hessenfarmer![]() |
Posted at:
2020-04-25, 23:21 UTC+2.0
when I started reading the Ai code I downloaded a c++ guide the rest should be clearly understandable and if you have problems just ask (here or by PM) Would be good to have another person around looking over this code. BTW here is the link to the related Pullrequest where you can see the latest status. Code seems to work. Needs some training rounds though.
Edited:
2020-04-25, 23:21 UTC+2.0
![]() ![]() |
teppo |
Posted at:
2020-04-26, 11:06 UTC+2.0
Of course, there should be fingerprint (DNA packet version) so that the C++ could ignore too-old DNAs.
Long term goal.. ..tell more, please! I am not familiar with the details, but it is easy to imagine that the goal also includes improvements to AI scoring code etc. ![]() ![]() |
Tibor |
Posted at:
2020-04-26, 11:39 UTC+2.0
Maybe not that long term - but somebody would sit down and spend some time on this. But the score is quite an challenge here. You can set up a score an any way - whatever you prefer, but currently you have to edit C++ code to change the score, so it is also a complication here. ![]() ![]() |
teppo |
Posted at:
2020-04-26, 13:29 UTC+2.0
There might be a lot of time for nerdy things during the summer holiday period this year. It is not that far away.
How much work would it to make a lua callback for this? I think that the more interesting is the question of opposition: Should the opponent algorithm(s) be constant during evaluation, and what algorithm to use to refine the DNA. It is kind-of minimizing problem, with many dimensions and expensive step size (=running games is slow). ![]() ![]() |
Tibor |
Posted at:
2020-04-26, 13:34 UTC+2.0
LUA is very good idea. However currently there are not LUA hooks in AI code. So this would be brand new chapter. ![]() ![]() |
hessenfarmer![]() |
Posted at:
2020-04-26, 14:58 UTC+2.0
lua might be good to change some parts of the fitness function, but we should be careful as lua is dead slow. From my perspective it doesn't matter much whether the opponent is stable or not, as we currently search for the DNA which does best in certain circumstances. And then we test it again in different challenges. by repeating and changing tribe as well as map we get the AI that does best in most circumstances. ![]() ![]() |
hessenfarmer![]() |
Posted at:
2020-04-26, 15:06 UTC+2.0
BTW https://github.com/widelands/widelands/pull/3873 Branch / Pull request is ready for review. Would be fine if somebody else then Tibor and me could test this. ![]() ![]() |
teppo |
Posted at:
2020-04-26, 15:49 UTC+2.0
How often does the lua file need to be called? I guess it is best to let the lua function decide how often it wants to be run, and whether it still wants the game to continue after this evaluation round or not. If the evaluation is run infrequently, efficiency does not matter that much. If some scoring algorithm needs to be run constantly, it would still be possible with open approach. ![]() ![]() |