Discuss the new AI features ("NoAI") introduced into OpenTTD 0.7, allowing you to implement custom AIs, and the new Game Scripts available in OpenTTD 1.2 and higher.
While analysing a deadlock situation for Train Convoy I encounted the following: if you remove a signal on a tile in a direction, indicated by the front tile, it also removes the signal in the other direction. I reduced the code to the following to illustrate the bug:
This will remove both signals.
If this is intended behaviour, I think it is very counter-intuitive (why else would you have to specify a front tile for removal?
glx:
As a human player, I don't need to specify the front tile, just clicking on a tile with signals with the magic bulldozer will remove them.
And when you give a direction by dragging, indeed all signals are removed in both directions.
But for an AI, it does not really make sense to have to specify the fronttile, when all signals are removed anyway. The presence of the front_tile parameter causes the confusion. If it wasn't present, the function would do the same. Now that it is present, it leads to the belief you can delete a signal depending on the direction.
So either removing the front_tile parameter, or delete signals per direction (my personal preference) would be better than the current situation, in my opinion.
planetmaker: that situation is a little more complex, just try on a sw-ne track with signals in both directions. No matter what direction you drag (AI has to specify direction), signals in both directions are removed
Last edited by GeekToo on 02 May 2009 16:08, edited 1 time in total.
GeekToo wrote:So either removing the front_tile parameter, or delete signals per direction (my personal preference) would be better than the current situation, in my opinion.
Indeed, my prefered solution would also be to only remove the signals in one direction, thus keeping the front_tile parameter.
GeekToo wrote:planetmaker: that situation is a little more complex, just try on a sw-ne track with signals in both directions. No matter what direction you drag (AI has to specify direction), signals in both directions are removed