AITile.IsBuildable()
Moderator: OpenTTD Developers
AITile.IsBuildable()
Just a quick one for the devs... I'm getting inconsistent results from AITile.IsBuildable() on coast tiles. This really feels like a bug to me, as the result is unpredictable. Mostly it returns false for any land tile that borders with water, but sometimes it returns true for no apparent reason. There can be a long stretch of coast tiles in a line, and one out of twenty will be buildable at random!
Ideally I'd like IsBuildable() to return true for coast tiles with nothing on them (it would be helpful for bridge building), but just having consistent results will be a start!
Is this a bug? Can we have it fixed? Is it already fixed?! (I'm still using r13326)
Thanks.
As for libraries, I've only just noticed that there are standard libs already. To be perfectly honest I don't know what the value will be in having 20 separate binary heap implementations made available, so I probably won't bother posting my own code anymore! Plus I'm not going to re-engineer my pathfinder to use the library code at this stage, so there wouldn't be much point in me posting my pathfinder either (and frankly, A* is A* regardless of who wrote it!!). I might post some other parts of my AI in the library format (maybe some of the graph stuff I'm working on) if people are interested, but that'll suit me for now. You'd all probably be horrified by my Java-esque style of coding anyway!! I use camelCase for variables and ExtremelyExplicitMethodNames().
Ideally I'd like IsBuildable() to return true for coast tiles with nothing on them (it would be helpful for bridge building), but just having consistent results will be a start!
Is this a bug? Can we have it fixed? Is it already fixed?! (I'm still using r13326)
Thanks.
As for libraries, I've only just noticed that there are standard libs already. To be perfectly honest I don't know what the value will be in having 20 separate binary heap implementations made available, so I probably won't bother posting my own code anymore! Plus I'm not going to re-engineer my pathfinder to use the library code at this stage, so there wouldn't be much point in me posting my pathfinder either (and frankly, A* is A* regardless of who wrote it!!). I might post some other parts of my AI in the library format (maybe some of the graph stuff I'm working on) if people are interested, but that'll suit me for now. You'd all probably be horrified by my Java-esque style of coding anyway!! I use camelCase for variables and ExtremelyExplicitMethodNames().
PathZilla - A networking AI - Now with tram support.
Re: NoAI Branch - An AI Framework
I'm sorry to bump my own post, but I don't suppose anyone can answer this question can they? Its kind of blocking my development at the moment.Zutty wrote:Just a quick one for the devs... I'm getting inconsistent results from AITile.IsBuildable() on coast tiles. This really feels like a bug to me, as the result is unpredictable. Mostly it returns false for any land tile that borders with water, but sometimes it returns true for no apparent reason. There can be a long stretch of coast tiles in a line, and one out of twenty will be buildable at random!
Ideally I'd like IsBuildable() to return true for coast tiles with nothing on them (it would be helpful for bridge building), but just having consistent results will be a start!
Is this a bug? Can we have it fixed? Is it already fixed?! (I'm still using r13326)
Thanks.
Its hard keeping track of stuff in just a single thread. That new forum will be very handy.
PathZilla - A networking AI - Now with tram support.
Re: NoAI Branch - An AI Framework
It is fixed now, and in 5 hours and 25 minutes in the binaries that will produced by thenZutty wrote:I'm sorry to bump my own post, but I don't suppose anyone can answer this question can they? Its kind of blocking my development at the moment.
The only thing necessary for the triumph of evil is for good men to do nothing.
Re: NoAI Branch - An AI Framework
You're a god!TrueLight wrote:It is fixed now, and in 5 hours and 25 minutes in the binaries that will produced by thenZutty wrote:I'm sorry to bump my own post, but I don't suppose anyone can answer this question can they? Its kind of blocking my development at the moment.
PathZilla - A networking AI - Now with tram support.
Re: NoAI Branch - An AI Framework
Mine is currently not working, seems AITile.IsBuildable is returning false on roads now..Zutty wrote:Wow! That IS impressive, considering that aircraft are at a natural advantage to buses in OpenTTD. Congratulations GeekToo You've set the bar!
Edit: Hey Truelight can we get RalphsAI into the tournament also?
Is this the intended behavior from now on?
Re: NoAI Branch - An AI Framework
yes.Ralph wrote: Mine is currently not working, seems AITile.IsBuildable is returning false on roads now..
Is this the intended behavior from now on?
The only thing necessary for the triumph of evil is for good men to do nothing.
Re: NoAI Branch - An AI Framework
Damn! If its any consolation, I need to spend tonight adjusting my AI to cope with this change too!!Ralph wrote:Mine is currently not working, seems AITile.IsBuildable is returning false on roads now..Zutty wrote:Wow! That IS impressive, considering that aircraft are at a natural advantage to buses in OpenTTD. Congratulations GeekToo You've set the bar!
Edit: Hey Truelight can we get RalphsAI into the tournament also?
Is this the intended behavior from now on?
I like this new feature though, as it forces me to formalise the traversal of existing roads.
PathZilla - A networking AI - Now with tram support.
Re: AITile.IsBuildable()
WOAH! MAGICAL THINGS HAVE HAPPENED!
PathZilla - A networking AI - Now with tram support.
Re: NoAI Branch - An AI Framework
Also, in the future, Rail will work as one might expect But after many problems with IsBuildable, it should now be stable.. I hopeZutty wrote: Damn! If its any consolation, I need to spend tonight adjusting my AI to cope with this change too!!
I like this new feature though, as it forces me to formalise the traversal of existing roads.
The only thing necessary for the triumph of evil is for good men to do nothing.
-
- Engineer
- Posts: 72
- Joined: 09 Apr 2006 23:49
- Location: UK
- Contact:
Re: AITile.IsBuildable()
Yeah, thanks again Truelight and the others for fixing that. It can return true if there is only half sections of road (since these can be removed when building on them) but not for full sections of road (which block building) if I recall the fix correctly. I guess the API docs reflect that.
Finaldeath
Who is online
Users browsing this forum: No registered users and 6 guests