Topic: AI patch suggestion
Tibor Topic Opener |
Posted at: 2014-04-30, 20:11
one of problems i see is that when building military buildings AI does not consider mines - military buildings should be pushed as close to hills with mineable fields as possible. Can somebody help with this?
This is basically what I want, I just need something proper instead of "find_unowned" Top Quote |
Tibor Topic Opener |
Posted at: 2014-04-30, 21:56
I just commited v. 6964... Top Quote |
SirVer |
Posted at: 2014-05-01, 09:01
find_unowned is a functor of type FindNodeUnowned as defined in src/ai/ai_help_structs.h (which is a terrible name for a file). You need to write your own functor that returns true in Top Quote |
Tibor Topic Opener |
Posted at: 2014-05-06, 21:59
Well, still working on my AI, here is a screenshot from todays test:
Top Quote |
SirVer |
Posted at: 2014-05-07, 06:27
If you made some significant improvements, I suggest merging them into trunk ASAP so that others can benefit from your work. You can continue working, but smaller patches are easier to work with anyways. Just propose your branch for merging when you think it is in a mergable state, then make a new one to continue working in. Top Quote |
Tibor Topic Opener |
Posted at: 2014-05-07, 22:33
Those changes are quite significant thought I did no changes deep under the hood, I changed only defaultai.cc and defaultai.h. I reworked scoring of buildings, added some stops/go controls for various "processes", perhaps it slowly gets to mergeable state. But I have not tested other races then barbarians yet, though algorithm should be race-independent. But there are still areas that need improvement (mines and so). And I would be realy thankfull if some independent person could test this before it is even merged. Just keep in mind it is not finished yet.. Top Quote |
Tibor Topic Opener |
Posted at: 2014-05-14, 21:52
Hi small update after couple of busy days, I would appreciate testing and feedback, it seems that AI works quite fine though a lot of polish and tweaking is possible and will be done...
Top Quote |
SirVer |
Posted at: 2014-05-15, 14:12
Tibor, if you are happy with your changes, feel free to suggest them for merging. Top Quote |
Tibor Topic Opener |
Posted at: 2014-05-15, 20:13
Hi, most of all it needs testing and feedback. Moreover I dont consider it as finished (ready for stable release) but I presume further tweaking and changes. So I will ask for merging. BTW, merging is undoable I believe... Top Quote |
Tibor Topic Opener |
Posted at: 2014-05-16, 21:28
Hi, today I modified algorithm for placing new military buildings to recognize nearby mine-able fields. Because previously new military buildings were placed based on amount unowned teritory only, and with this change I want to push military buildings as close to mines as possible.
Please advice how to clean the mess up... Top Quote |