NoAI FAQs

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

User avatar
Dustin
Transport Coordinator
Transport Coordinator
Posts: 272
Joined: 07 Dec 2005 19:22

NoAI FAQs

Post by Dustin » 11 Sep 2009 21:10

This forum deserver a FAQ. Since I didn't want to have to own updates, I have created it as a wiki page and provided a link. Please feel free to add and edit. We should be able to point people here who have some of the common questions.

http://wiki.openttd.org/NoAI_Forum_FAQ

User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1504
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Re: NOaI FAQs

Post by SirkoZ » 11 Sep 2009 21:26

Nice AI FAQ, Dustin.
I read through and fixed some minor typos, e.g. OpenTDD->OpenTTD and Idead->Ideas.

User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: NOaI FAQs

Post by Zuu » 11 Sep 2009 22:32

Good work Dustin! I have fixed the links so that they are using the wiki syntax which is different than the syntax on the forums. I made all questions equally spaced. But it seams that when I edit a sub-section the spacing gets back to only a single line in the wiki code causing the sections to be displayed very close to each other giving much worse readability as well as making it much harder to quickly scan the page. A wiki guru might have a solution to that?

Edit: Perhaps we should make this thread sticky? Or make a new one which has a first post more strictly targeted toward users of the FAQ page. And leave this thread for discussions regarding the FAQ page.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)

Yexo
Tycoon
Tycoon
Posts: 3653
Joined: 20 Dec 2007 12:49

Re: NOaI FAQs

Post by Yexo » 11 Sep 2009 22:42

Nice work Dustin.
Zuu wrote:Edit: Perhaps we should make this thread sticky? Or make a new one which has a first post more strictly targeted toward users of the FAQ page. And leave this thread for discussions regarding the FAQ page.
I've made this one sticky for now. I agree that maybe the first post should be changed a bit, but I'll leave that for Dustin (or anyone else posting suggestions for him). Of course discussion the faq is fine here too.

Edit: I'll check later, but I think both http://www.tt-forums.net/viewtopic.php?f=65&t=42159 and http://www.tt-forums.net/viewtopic.php?f=65&t=37956 need no longer be stickied as their content is (or should be integrated in) this faq.

User avatar
fanioz
Transport Coordinator
Transport Coordinator
Posts: 320
Joined: 19 Dec 2008 05:03
Location: Indonesia
Contact:

Re: NoAI FAQs

Post by fanioz » 12 Sep 2009 03:40

Nice FAQ :D
Correct me If I am wrong - PM me if my English was bad :D

**[OpenTTD AI]** Image
***[NewGRF] *** Image

User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: NOaI FAQs

Post by Zuu » 12 Sep 2009 06:25

Yexo wrote:Edit: I'll check later, but I think both http://www.tt-forums.net/viewtopic.php?f=65&t=42159 and http://www.tt-forums.net/viewtopic.php?f=65&t=37956 need no longer be stickied as their content is (or should be integrated in) this faq.
Eventually that should be possible since the knowledge in those two threads could be integrated into the FAQ. Then it might be worth though to split the FAQ into a user part and a AI development part.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)

petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: NoAI FAQs

Post by petert » 12 Sep 2009 19:35

(Q) How can I get the old AI back?

(A) You can't in OpenTTD. There are a lot of AI's that work in different ways. You should shop around and see if there is one you like.
Not true...exactly. You could use an AI like Simple AI.

User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: NoAI FAQs

Post by Zuu » 12 Sep 2009 20:14

petert wrote:
(Q) How can I get the old AI back?

(A) You can't in OpenTTD. There are a lot of AI's that work in different ways. You should shop around and see if there is one you like.
Not true...exactly. You could use an AI like Simple AI.
The fact that SimpleAI uses the library pathfinder directly disqualify it as getting the old AI back. If you want to make a serious attempt to re-make the old AI as closely as possible I think you should more or less just translate the C++ code of the old AI into Squirrel (the language that NoAI AIs are written in). And leave out the parts where it cheats. Some parts you probably have to work around a bit because the NoAI interface differs from the internal structure of OpenTTD. It will probably not stay alive long, but it will be as closely to the old AI that you can get with NoAI.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)

petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: NoAI FAQs

Post by petert » 14 Sep 2009 01:38

Ok, now I understand. Why was OpenTTD allowed the AI to cheat before?

User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: NoAI FAQs

Post by Zuu » 14 Sep 2009 08:33

Because that is how TTD worked. Also if you would simply remove cheating from the old AI which happened in a number of ways, not just free tereform, then the AI would have serious problems to not go bankrupt.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)

User avatar
CommanderZ
Tycoon
Tycoon
Posts: 1872
Joined: 07 Apr 2008 18:29
Location: Czech Republic
Contact:

Re: NoAI FAQs

Post by CommanderZ » 14 Sep 2009 09:19

petert wrote:Ok, now I understand. Why was OpenTTD allowed the AI to cheat before?
Because cheating was the only way its stupid algorithms could lead to some result. It wouldn't even build a track from A to B if it couldn't cheat.

Brumi
President
President
Posts: 904
Joined: 18 Jul 2009 17:54

Re: NoAI FAQs

Post by Brumi » 15 Sep 2009 08:59

Nice work, Dustin! :)
I've noticed a little error:
(Q) The pathfinder libraries are slow. Can I make them faster?
(A) Yes. Fanioz has a method.
Here Fanioz answered the question "How to add a penalty for level crossings in the library pathfinder?", not the one mentioned above. And IMHO that is not a typical Frequently Asked Question. I'll remove it if nobody has an objection.

User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: NoAI FAQs

Post by Zuu » 15 Sep 2009 17:20

I think adding custom penalties to the pathfinder should stay there. But then I would vote for having a separation of user-questions and AI development questions, so that such questions can be in the development section without making the user part harder to navigate.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)

Blustuff
Engineer
Engineer
Posts: 112
Joined: 21 Aug 2008 09:37
Location: France

Re: NoAI FAQs

Post by Blustuff » 15 Sep 2009 18:43

This is an information which would have its place in the library documentation or at least in FAQ dedicated to this library. However, the AI FAQ could contain more specific FAQ. This would give some hierarchy like :
  • NoAI FAQ
    • NoAI for players FAQ
    • NoAI for developpers FAQ
      • Pathfinder library FAQ

User avatar
Dustin
Transport Coordinator
Transport Coordinator
Posts: 272
Joined: 07 Dec 2005 19:22

Re: NOaI FAQs

Post by Dustin » 18 Sep 2009 17:57

Yexo wrote:Nice work Dustin.
Zuu wrote:Edit: Perhaps we should make this thread sticky? Or make a new one which has a first post more strictly targeted toward users of the FAQ page. And leave this thread for discussions regarding the FAQ page.
I've made this one sticky for now. I agree that maybe the first post should be changed a bit, but I'll leave that for Dustin (or anyone else posting suggestions for him). Of course discussion the faq is fine here too.

Edit: I'll check later, but I think both http://www.tt-forums.net/viewtopic.php?f=65&t=42159 and http://www.tt-forums.net/viewtopic.php?f=65&t=37956 need no longer be stickied as their content is (or should be integrated in) this faq.
Thanks for the sticky.

What do people think should be in the first post? I don't want to put content there that will get dated, because I don't want to let anyone down if I don't keep the post up-to-the-minute or wander off.

-Dustin

User avatar
Dustin
Transport Coordinator
Transport Coordinator
Posts: 272
Joined: 07 Dec 2005 19:22

Re: NoAI FAQs

Post by Dustin » 18 Sep 2009 18:01

Brumi wrote:Nice work, Dustin! :)
I've noticed a little error:
(Q) The pathfinder libraries are slow. Can I make them faster?
(A) Yes. Fanioz has a method.
Here Fanioz answered the question "How to add a penalty for level crossings in the library pathfinder?", not the one mentioned above. And IMHO that is not a typical Frequently Asked Question. I'll remove it if nobody has an objection.

I object to removing it. :) I have seen the question a couple times on the boards and it lead to some heated messages. The FAQ is my attempt to make the frequency of the "go search" responses less common on the AI board.

I like your suggestion to split the FAQ into sections. The wiki markup to do that is pretty easy. You want to go ahead with that?

User avatar
smallfly
Chairman
Chairman
Posts: 862
Joined: 19 Oct 2009 13:29
Location: Germany

Re: NoAI FAQs

Post by smallfly » 03 Nov 2009 13:35

By the way: What does the "No" of "NoAI" stand for? (sorry if that is a stupid question, but i didnt found an answer in the wiki)
www.p1sim.org - P1SIM - Traffic, Logistics, City-Building & more
Join the discussions here on tt-forums.net!

Yexo
Tycoon
Tycoon
Posts: 3653
Joined: 20 Dec 2007 12:49

Re: NoAI FAQs

Post by Yexo » 03 Nov 2009 13:41

smallfly wrote:By the way: What does the "No" of "NoAI" stand for? (sorry if that is a stupid question, but i didnt found an answer in the wiki)
It stands for "No".

The NoAI branch started out by removing the old AI, hence "No AI".

User avatar
smallfly
Chairman
Chairman
Posts: 862
Joined: 19 Oct 2009 13:29
Location: Germany

Re: NoAI FAQs

Post by smallfly » 03 Nov 2009 13:47

Yexo wrote:
smallfly wrote:By the way: What does the "No" of "NoAI" stand for? (sorry if that is a stupid question, but i didnt found an answer in the wiki)
It stands for "No".

The NoAI branch started out by removing the old AI, hence "No AI".
Thanks

But why did you right the explanation so small that i have to zoom in in my browser to read the text?! (see screenshot)
sosmall.jpg
sosmall.jpg (7.15 KiB) Viewed 27695 times
www.p1sim.org - P1SIM - Traffic, Logistics, City-Building & more
Join the discussions here on tt-forums.net!

User avatar
cmoiromain
Chief Executive
Chief Executive
Posts: 655
Joined: 15 Jan 2007 21:45
Location: FRANCE
Contact:

Re: NoAI FAQs

Post by cmoiromain » 03 Nov 2009 23:49

[Off topic]You could have copied the line and pasted it somewhere else to read it[/Off topic]

Because it doesn't answer you questions, it's only a complement for the curious people. The important part of the message is in normal size.
I am little, ugly, and nasty. How do you do?

Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 3 guests