Topic: main roads becoming normal again
|
Tibor |
Posted at:
2018-05-07, 07:15 UTC+2.0
It crashes reliably for me. AI-players only game... Yes, your fix is exactly what I had in my mind, but you are an author
Top
Quote
|
|
ypopezios |
Posted at:
2018-05-07, 14:03 UTC+2.0
This is an indication that AI makes something unintelligent. But AI fixes should wait for later, after the underlying model gets friendlier to them. EDIT: This time AI was innocent.
Edited:
2018-05-10, 06:37 UTC+2.0
Top
Quote
|
|
Tibor |
Posted at:
2018-05-07, 14:23 UTC+2.0
Oh no. You cannot forbid users to build dead end roads.It is other way round - your algorithm should support all cases....
Edited:
2018-05-07, 14:26 UTC+2.0
Top
Quote
|
|
ypopezios |
Posted at:
2018-05-07, 14:37 UTC+2.0
In my tests I built everything I could think of (including all kinds of dead-ends), without ever getting a crash. So the crash should be some special edge case. But sure, better be safe than sorry. EDIT: Although a rare case, it was not an edge case.
Edited:
2018-05-10, 06:39 UTC+2.0
Top
Quote
|
|
Tibor |
Posted at:
2018-05-07, 14:42 UTC+2.0
So your test coverage is not 100%. AI does only human player can do - at least in regard to road making and dismantling....
Top
Quote
|
|
ypopezios |
Posted at:
2018-05-07, 14:49 UTC+2.0
It is easily observable that AI's road-making is like a trial-and-error process, quite unsimilar to what humans do. But yes, I never claimed 100% test coverage. People are encouraged to test for themselves.
Top
Quote
|
|
Tibor |
Posted at:
2018-05-07, 14:58 UTC+2.0
I meant that AI can do only what humans can do:
AI's road making and dismantling is sensitive to ware traffic and scarcity of buildable spots - yes, it is quite dynamic and if you wish you can call it trial-and-error process...
Top
Quote
|
|
ypopezios |
Posted at:
2018-05-07, 15:17 UTC+2.0
Let's fix that too. Insert line 518 in file economy/road.cc like this:
Edited:
2018-05-07, 15:22 UTC+2.0
Top
Quote
|
|
Tibor |
Posted at:
2018-05-07, 21:28 UTC+2.0
OK, it does not crash anymore. Also new revision was pushes to launchpad.
Top
Quote
|
|
ypopezios |
Posted at:
2018-05-10, 06:00 UTC+2.0
Corrected propagation method, based on shortage instead of possession:
Edited:
2018-05-10, 15:25 UTC+2.0
Top
Quote
|



