Progress Report

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.

Moderator: OpenTTD Developers

Post Reply
TrueBrain
OpenTTD Developer
OpenTTD Developer
Posts: 1370
Joined: 31 May 2004 09:21

Progress Report

Post by TrueBrain »

Hi all!

Well, that has been a while, not? Not that we didn't do anything for NoAI, just nothing you would notice. So I thought it was about time I would let you guys know what we are up to.

As you might know we have been working on a Squirrel replacement. The first version kind of failed (not really knowing what you need to do, doesn't help in a first version), so a second version was started. Too bad Rubidium thought it would be a good time to start his thesis, so ... that is in a stand still to :) But ... in the meantime I have been working hard in my local branch to change the internals of OpenTTD to handle the NoAI framework much nicer (read: without threads, without complicated code, ...). It kind of depends on NAIL being done, I thought for a long time, but after a good look at Squirrel, it turns out that I can commit most part of my local changes to NoAI.

So, that is exactly what I am doing now. Slowly I am re-reading my changes and move them into the NoAI branch. Today I did most part to remove threads. Tomorrow I hope to remove threads. The days after that I slowly transform the NoAI code to a more readable form (codewise, that is). When that is done, we will need to stabilize that code a bit, so that most likely means I will put my attention back on NAIL. Nevertheless, even if NAIL never gets done, the new code should remove a lot of instabilities from the NoAI code. Also that should finally allow me to restart the tournament server (for who doesn't know, it is stopped because there are AIs who hit an infinite loop; not only annoying, it also makes it impossible to run the tournament server automated).

To summarize: a lot has been going on, just not in plain sight ;) (and also, Christmas is not the time to program :) ). Slowly we will move most things into plain sight, which should make NoAI stable. We are looking into merging NoAI into trunk, but don't expect this before 0.7. It needs a long time inside trunk to stabilize and allow people to write good AIs to be included in the main distribution. But more about that when that happens ;)

Any questions or suggestions, post them here! Have a good one!
The only thing necessary for the triumph of evil is for good men to do nothing.
Maninthebox
Engineer
Engineer
Posts: 113
Joined: 08 Aug 2008 11:35
Contact:

Re: Progress Report

Post by Maninthebox »

Hmmmm... I'm running the latest greatest (14861) with a few AI's: otvi* (so that's 3), rondje, admiral (latest) and nocab (latest). NoCab does basically nothing as it still lacks the default roadtype thingie. Rondje becomes a flat line as soon as it throws it first exception, whereas it used to continue. After all, we do catch our exceptions by means of one big try-catch around the main loop. I tried it twice and in both cases my subsidy driven ai wins big time... that's new ;-) Could this have anything to do with the changes on threads by any chance or did I miss another vital API change somewhere?
TrueBrain
OpenTTD Developer
OpenTTD Developer
Posts: 1370
Joined: 31 May 2004 09:21

Re: Progress Report

Post by TrueBrain »

Maninthebox wrote:Hmmmm... I'm running the latest greatest (14861) with a few AI's: otvi* (so that's 3), rondje, admiral (latest) and nocab (latest). NoCab does basically nothing as it still lacks the default roadtype thingie. Rondje becomes a flat line as soon as it throws it first exception, whereas it used to continue. After all, we do catch our exceptions by means of one big try-catch around the main loop. I tried it twice and in both cases my subsidy driven ai wins big time... that's new ;-) Could this have anything to do with the changes on threads by any chance or did I miss another vital API change somewhere?
The last few revision seem to give weird problems/errors. This also includes the latest nightly (which should be done about now). My local branch removes threads completely, and should stabilize things again a bit ... I am awaiting testing on MSVC of my patch, if that works, I will re-trigger a NoAI compile, and you can test again ;)

[Update]
There is a new NoAI binary on its way. Threads are no longer required for NoAI to work, this should fix the MacOSX problems (please let me know if this is really true). This latest version should give no real problems (besides an assert on DoCommandMode .. a strange race-condition). Let me know any other problems :) (and if possible, with steps to reproduce).
The only thing necessary for the triumph of evil is for good men to do nothing.
User avatar
Zutty
Director
Director
Posts: 565
Joined: 22 Jan 2008 16:33

Re: Progress Report

Post by Zutty »

Nice to see you are still working on NoAI :) Its hard to keep up with things when work/study makes you so busy.
PathZilla - A networking AI - Now with tram support.
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 4 guests