Topic: why the AI don't dismantle the military buildings it's about to lose?
king_of_nowhere![]() Topic Opener |
Posted at:
2015-06-19, 02:47 UTC+2.0
every human, when a military building is going to be conquered, will dismantle it. and when attacked by vastly superior forces, will dismantle before the fight to avoid losing soldiers. there's no harm in it: your opponent can always dismantle it himself if he cannot defend it (there are a few cases where the building is far enough that the opponent cannot dismantle it or he will lose the soldiers, in which case there may be a point in not dismantling; but it's a very rare occurrence). That's a piece of strategy that is fairly intuitive, that everyhuman will use, and yet the AI does not do it. I've seen plenty fo discussion among the pprogrammers on how to teach the AI when to dismantle a conquered building that is not connected to the economy, but that's a situation that only happpens with AI, so by teaching the AI to play like a human the problem would be avoided anyway. The conditions for dismantling a building are quite intuitive:
count should be updated every time one of the defending soldiers is killed. I realize that applyiing this principle could lead to the AI never fighting a stronger opponent, and always retreating until it makes a last stand with all his soldiers inside the headquarter. to avoid this, conditions could be set where the AI will defend anyway. they could be
Even in those cases, if the enemy is about to conquer because the last defender died, dismantle the building. I realize some people prefer to play with an AI whose buildings can be conquered. in which case this behavior could be optionally shut down. or it could be part of a "tournament mode AI" that will use all the human's dirty tricks that casual players may prefer to skip.
Edited:
2015-06-19, 02:54 UTC+2.0
![]() ![]() |
einstein13![]() |
Posted at:
2015-06-19, 03:10 UTC+2.0
Very good idea!
Hmm... 15 points in your idea is like 4 big buildings! It is quite big amount. 4 farms around one building? OK. I can imagine that situations, but for me it is quite high limit. Also I don't think that this limit is very important: I can imagine some situations, where this limit should not count. I dismantled few towers with (in your idea) count of ~20 points. I was expected to die- that is true, but defending there was not a good idea.
Yes, dismantling military building IS a trick, so it should be with "moderate" and "hard" mode of AI, if we create few difficulty levels. I can't imagine that easy one will use those tricks to win einstein13 ![]() ![]() |
Tibor |
Posted at:
2015-06-19, 21:09 UTC+2.0
Well, few words about the question.
![]() ![]() |
king_of_nowhere![]() Topic Opener |
Posted at:
2015-06-21, 21:48 UTC+2.0
Like most of our differences in opinions, this arise because you think mostly in terms of big maps, and i think mostly in terms of small maps. In a big map, you can afford to lose 4 farms and you'll barely notice. In a small map, losing 15 points as I defined them is probably enough to completely stop your economy, and you don't have the space to rebuild elsewhere, so you may as well make your last stand there. Anyway, all the numbrs need to be playtested if the idea is implemented. I only did some rough guessing.
In my experience in the tournament, every player did that. when they are attacked by level 10 soldiers and could not defend themselves, they dismantled to cut their losses. When I was attacked by greater numbers, I dismantled before my soldiers were in danger of death. And in any case a building about to fall was dismantled. the only times I remember a building actuallly being captured was when there was a big battle with many buildings involved, so a human may fail to notice some of them. I intentionally did that against kuvastin, i launched a large attack against a building and simultaneously sent 2 soldiers against a tower on the other side. it worked, the opponent was distracted by the main attack and did not notice the tower. i conquered it, and it gave me vision to the headquarter, allowing me to attack and burn it and kill the opponent quickly. which showcases how important dismantling can be. And programmers often say that they would like to make the AI more human-like, so I wondered, that's a real big difference between human and AI, why not to include it? As for the detail of the programming, I have no idea how to do that. I think the algorithms I proposed should be easily understood by an AI, but I have no experience of actual programming.
Edited:
2015-06-21, 21:48 UTC+2.0
![]() ![]() |
einstein13![]() |
Posted at:
2015-06-22, 01:23 UTC+2.0
I was thinking about loosing your position on big map: you have only few more space around your headquaters, which is rather empty (all resources are moved to other spots), and you want to have more time to prepare defence in other spot. So it is better to loose your farms in current frontline, just to give some time and save warriors. And yes, that is connected mostly to big maps. But after your answer I have another (better?) idea, how to calculate points:
So basic calculation should consider how many buildings you will lose. Imagine that you have 50 farms. Loss 5 of them is 10%. Different situation is when you have only 8 farms and you expect to lose 5 of them (62,5%). I don't have complete equation for that, but general idea. It will solve difference between big (lots of place) and small (not enough place) maps. The total points don't have to be integer, they can be float numbers
This is only a small change. Your idea is like:
If you lose 100% of a building, it counts twice. If you lose only 10%, it counts with 0.2 factor (0.8 point for each farm, for example). Basic points are for 50% loss. Equation is not strict now. It can change, as well your idea of points What do you think? einstein13 ![]() ![]() |
Tibor |
Posted at:
2015-06-22, 19:32 UTC+2.0
Next turn when I will work on AI I will look also on this stuff. It depends on how difficult it would be to implement. But I dont say "no" ![]() ![]() |
king_of_nowhere![]() Topic Opener |
Posted at:
2015-06-22, 20:01 UTC+2.0
I think we are putting the metaphorical cart in front of the metaphorical horse here. first we need some programmer to get interested in this idea (thanks tibor), then we need him/her actually putting it into code - which, as I understand, is not so easy: right now AI does nothing in the battle except deciding when to attack, so it would require writing a lot of new code - and then we can start playtesting and acctually tweaking the numbers. Yes, I suppose that taking into account the total dimension of the economy would be the best way to decide when to make a last stand, but we are fairly early in the planning. You may also notice that the condition I set for retreating (twice as much power in the attack than in the defence, and the weaker attacking soldier being stronger than the stronger defending soldier) is also extremely conservative. Also, I prefer to start on the conservative side. right now, the AI never retreats. If the AI retreats a small number of times, when retreating is surely the best action, then that's an improvement. If the AI retreats often, including some times when it should not, we have just changed a weakness with a different one. By making the AI very unlikely to retreat, we can never do worse than the current situation. ![]() ![]() |
einstein13![]() |
Posted at:
2015-06-22, 21:30 UTC+2.0
Ok, I get your point, king_of_nowhere. So I will have more patient now And Tibor: if you will have any trouble with coding (any math problems, equations needed or anything like that), we are open to help you. I can't write in C++, but testing for sure, plus math ideas einstein13 ![]() ![]() |
teppo |
Posted at:
2015-06-24, 03:23 UTC+2.0
I dislike dismantling/burning military sites under attack altogether. The defender effectively forces a superior attacker to retreat, by starting to carry mattresses away. I know that WL does not aim towards realistic warfare, but still that is odd. This play style requires that player observes individual battles, ready to click a button at a critical moment. In my opinion this moves the focus from economy towards battles. When everybody is doing it, AI doing it too makes sense though. ![]() ![]() |
Stefan![]() |
Posted at:
2015-06-24, 21:48 UTC+2.0
I agree with teppo. I also dislike the idea of dismantling military buildings under attack. In my opinion it is a better idea to prevent the human players to dismantle a building under attack instead of making the AI do the same thing. ![]() ![]() |