Topic: main roads becoming normal again
GunChleoc |
Posted at: 2018-05-30, 13:48
I'm not at my development machine before August, so somebody else will have to continue updating this branch. If you can give me your Launchpad account, I can add you to widelands-dev so that you can pull and push to the existing branch. Busy indexing nil values Top Quote |
ypopezios |
Posted at: 2018-05-30, 14:15
What account? You mean the name "ypopezios"? Top Quote |
GunChleoc |
Posted at: 2018-05-31, 09:54
Yep, found you and added you. You can now push and pull branches to widelands-dev, just don't push anything to trunk. Busy indexing nil values Top Quote |
WorldSavior |
Posted at: 2018-06-01, 00:36
That's true. Maybe a new starting condition which is more powerful than the trading outpost could help a little bit.
Ok
I think that's only one shortcoming of the gameplay.
But maybe the AI doesn't have to play well on any weird map...
And obviously the AI wouldn't make the most of perfect buildable space if it would use a clever road system there?
Maybe you missed it because of the same reasons which let you think that non-obvious things are obvious Wanted to save the world, then I got widetracked Top Quote |
ypopezios |
Posted at: 2018-06-01, 12:07
An AI that makes the most of imperfect space wouldn't have problems with a perfect one. While an AI that can build well only on perfect space isn't a smart AI.
The AI doesn't have to always play well, but it has to always play decently. Failing to build a working economy is embarrassing and can ruin a game that lasted for hours.
I use the same brain in every situation. But maybe that's not obvious either... Obviousness is subjective, enlightenment is not. Top Quote |
hessenfarmer |
Posted at: 2018-06-01, 19:43
I just tried for three days now to understand the road building algorithm of the AI but didn't manage to do so. If somebody can explain this to me I would be very happy to participate in the discussion for a better road building algorithm. I realized we have some A* algorithm for routing wares and solfiers and workers. But I am not sure if there is something similar in the AI road building. For me it would be an improvement if AI would build shorter roads to connect to the economy. So I would propose after having chosen to build a building to find the nearest flag (in terms of walkable nodes) connected to the HQ economy. Perhaps a dijkstra algorithm could help here. However as long as I don't understand the current algorithm there is no chance to go any further. Top Quote |
ypopezios |
Posted at: 2018-06-01, 22:22
@hessenfarmer We are not in that discussion yet, at least not me and not on this thread. My position has been that we have to firstly improve the underlying mechanisms (including routing), and then improve the AI on the resulting friendlier basis. So I haven't bothered understanding current AI algorithm, but it is obviously a trial-and-error variation (i.e. not planning ahead). Thus there is plenty of room for improvements, but it would be a pain to work with current material. Therefore, I'm focusing on the material for now, and more specifically on making flags smarter. Top Quote |
Tibor |
Posted at: 2018-06-02, 18:57
As for roading, there are two basic actions AI does, see comments above the two funtions:
Yes, the system is trial-error, or I would prefer "dynamic" and it is expected that road network will "settle down" eventually. Also road network should react to two things:
It is bit complex so you will have to rewrite it from scratch, but it is very interesting job, I enjoyed it I can be more specific if you have specific questions Top Quote |
ypopezios |
Posted at: 2018-06-05, 03:40
I applied the suggested fix. Idle promoted roads now get scheduled for demotion after the right amount of time. In the end, there was no need for periodical charges of the wallets, so the implementation is very light on the CPU. I tested it locally and it works. Windows version will have to wait for AppVeyor's recovery from latest break. EDIT: Windows version now available here. Also tested and working. Edited: 2018-06-06, 01:52
Top Quote |
WorldSavior |
Posted at: 2018-06-09, 12:44
If you think so... Well, making the most of imperfect space is probably much more difficult than making the most of perfect space. It would be interesting if an AI with a general optimal road system would use a known road system for perfect building ground automatically...
You consider yourself as illuminated? Wanted to save the world, then I got widetracked Top Quote |