Moderator: OpenTTD Developers
This is now version 1.00, pfff, after all this time i finally manage to do it !
You can grab it on bananas
I'm happy how the AI perform and compete with others, specially without using trains and the eyecandy features doesn't really impact its perf so much.
This is what the AI does now :
- Handle roads (truck all cargos, bus)
- Handle aircrafts (limited to passenger & mail), upto 5 different models could run at the same time (that's to gave a more human touch & diversity in the game, including choppers)
- Should be playable on hard conditions (low money, hard settings... in fact because i need to tune it up a bit more, it play nicer for now in poor conditions)
- Can upgrade vehicles (using its own vehicle upgrade)
- Can upgrade airports
- Can upgrade road stations
- Try to build a network of airports and run aircrafts on it
- 3 options that affect gameplay (a bit dumb ai, fair player or total war), adapt to difficulty settings (this influence where it build stations, number of vehicles allowed...)
- Save/Load supported
- Pretty stable (well, that's not a feature, but it should )
- Works with newgrfs (well, the ones i test, ones that change vehicles)
- Can autorepair damage route (road route only)
- Balance load at airports
- Balance load at stations
- Reuse stations & depots (also have a limit per towns to not crowd towns, this depend on gameplay options)
- Detect and lower roads stuck with too many vehicles
I'll be glad to get feedback (specially bugs, i hope you won't get too much crashs)
- (90 KiB) Downloaded 544 times
- (670 KiB) Downloaded 853 times
Just before posting this report, your AI crashed and produced this error:
I've been testing it now, here are my remarks:
- Your AI is quite CPU-heavy. The game lags hard if you're fast forwarding, and after 4 years, it lags even on normal speed. Try to add some AIController::Sleep()-s in your code.
- I'm sure you know it, as there are quite a lot of occurences of this one: I've seen two types of this problem: when the land was sloped wrong and when it wasn't, probably a vehicle was in the way when the AI tried to connect that piece of road.
- I've seen a route where there were no depots, only double stations at both ends. But later I saw that two depots had been built - clever!
- A little thing, but "Napoleon" as the manager name appears to be wrong. Some coding issue, I believe.
Zuu: saddly i can't post a new working version with correction to the bug you've catch Zuu (i've modify too much the ai, and big changes aren't finished yet), but it's now fix.
For the tar problem, i don't know, i have just use tar -cf to build it, and file roller to remove a TODO file from it (might be file roller that put havock)
Brumi: will do, i know it run hards for now i will try optimize that a bit later.
I know the slope problem, last time i played with slope i was having headhatch
I'll note i should fix that
For the strange no depot on route or not connected station, it's because if the ai lack money it just stop building road structure (or depot) until it will try later to fix this (as long as station is there, route is considered "working", and that could be fix with few more bucks). The ai itself love to destroy its own depot because it's like a reserved space to upgrade the station, it work nice to find a spot next to your current station, it doesn't work nice when you destroy your depot and lack money ^^
The napoleon bug comes because the name is "a la french", so it's Napoléon, looks like openttd doesn't really like the "é", i have drop it to fix that.
I've start big changes to the ai i was planning to end this WE, saddly i have to go work (and it wasn't plan at first), so i'm affraid i couldn't gave you a new version with less bugs soon.
It should, as far as I know work. As long as you're using the right encoding for the files, i.e. as long as the file it UTF-8 encoded.krinn wrote:it's Napoléon, looks like openttd doesn't really like the "é"
After all, the translated AI error messages, when they crash, use the same kind of characters; they even can handle the Chinese characters.
Anyway, congrats for the new release, I'll test it more when I'll have a bit more free time
I don't have much time to correct it now, i've just check the code to see conditions where this bug could come from. And found it easy, the solve need a better analyze to see why it happen (the bug itself isn't interresting, why it happen is more).
I will correct it when i have more time, i might do a simple workaround until i could do better.
And i also need to add trains, and change things (like optimize for big map play) and this and that and.... pfff so much time need !
Indeed! If it wasn't for the time constraint, I would have had a many more features in CluelessPlus, and I would have time to improve PAXLink so that it works better on the economy management section.krinn wrote:... pfff so much time need !
Zuu: it's even worst, the more time i lack to code & fix things, the more i think about what i could do to make things better.... But as it's the period where my job eats all my time until winter, i'm far from an escape.
But I encountered a new crash in 1972:
- new crash.png (31.84 KiB) Viewed 26891 times
Looking at your code and wondering what does this do?(comments are mine)...
local townid = townlist.Begin(); // townid is TownID?
local townloc = AITown.GetLocation(townid); //townloc is TileIndex
local place_id = AITile.GetClosestTown(townloc); //place_id is TownID
Is there some advantage to this?
It's the easiest thing you could create with a visible result. I suppose everyone start playing with the buildhq at first no ?
i've start the ai with 0 knowledge about squirrel and api, thanks to brumi's code, i've learned a lot from that. The ai start as a fork of simpleai because brumi want keep simpleai as close to original ai while i was wishing some more functionalities.
then after modifying a lot and adding a lot, i was stuck by poor concept and limitations, learning more (this time from rondje) shown me howto implement oop with squirrel (and i must say, it's the most nice and smart code i've seen in squirrel),
So i've change my mind and rewrite nearly everything from scratch, keeping some basic functions i don't feel the need to rewrite.
this is just a part left from earlier dev of the ai.
Stats: One thing I noticed is that your AI use more stations than mine. It can potentially find a gold mine by exploring more connections quicker but will get a higher maintenance cost as one has to pay maintenance for each station that the AI has. The maintenance fee is not very high though, so as long as you don't spam the game with stations, it is not a major issue. (but it is a contributing factor why PAXLink has economic problems)
In this game, my AI didn't build even a single air link, but your AI managed to build one. Good.
People who like to complain on bad reuse of road will be disappointing by this game as both AIs did a very good job on this.
but i'll try to change that, if my ai manage to understand howto terraform one day ^^
for the airline, i have made code to help build one and help build aircrafts as well, so it's not a big surprise for me, just result of work and evil thinking.
I'm still happy it work as expect this time
Users browsing this forum: No registered users and 2 guests