NoAI Forum FAQ

From OpenTTD
(Difference between revisions)
Jump to: navigation, search
(A FAQ for the NoAI forum.)
 
m (Plurals don't have apostrophes)
 
(22 intermediate revisions by 12 users not shown)
Line 1: Line 1:
 +
{{Other_languages
 +
|en=NoAI Forum FAQ
 +
|fr=FAQ du forum NonIA
 +
|language_page=en
 +
}}
 +
{{-}}
 +
{{NoAI}}
 +
 
These are Frequently Asked Questions for the NoAI Forum at http://www.tt-forums.net/viewforum.php?f=65
 
These are Frequently Asked Questions for the NoAI Forum at http://www.tt-forums.net/viewforum.php?f=65
  
=NOaI FAQ=
+
=NoAI FAQ=
  
 
==(Q) How can I get the old AI back?==
 
==(Q) How can I get the old AI back?==
(A) You can't in OpenTDD. There are a lot of AI's that work in different ways. You should shop around and see if there is one you like.
+
(A) You can't in OpenTTD. There are a lot of AIs that work in different ways. You should shop around and see if there is one you like.
  
 +
(A) The nearest match for the old AI's behavior is probably SimpleAI, an effort at reproducing the old AI's strategy in the new AI framework.
  
 
==(Q) I don't like any of the new AIs. Can I have the old AI back now?==
 
==(Q) I don't like any of the new AIs. Can I have the old AI back now?==
(A) Sorry, no you still can't. The old AI cheated. A lot. The new framework doesn't allow the AI to cheat. It can't do anything you can't do. There are many AI's, some with the express purpose of being good replacements for the old AI. Read on if you want to influence them to be more to your liking.
+
(A) Sorry, no you still can't. The old AI cheated. A lot. It would terraform for free, ignore the town council's attitude towards a player. The new framework doesn't allow the AI to cheat. It can't do anything you can't do. There are many AIs, some with the express purpose of being good replacements for the old AI. Read on if you want to influence them to be more to your liking.
 
+
  
 
==(Q) What should I do if an AI crashes?==
 
==(Q) What should I do if an AI crashes?==
(A) If you want to be helpful a screenshot of the red text is appreciated. Be sure to get the whole line. The numbers on the right hand side are important. Please make every effort to get the whole line. Post the screenshot in the AI thread.
+
(A) If you want to be helpful, a screenshot of the red text is appreciated. Be sure to get the whole line. The numbers on the right hand side are important. Please make every effort to get the whole line. Post the screenshot in the AI thread corresponding to the crashed AI.
  
 
==(Q) What should I do if I find a bug in an AI?==
 
==(Q) What should I do if I find a bug in an AI?==
Line 19: Line 27:
  
 
==(Q) What should I do if I think an AI should do something differently, add a feature, support a newgrf or something like that?==
 
==(Q) What should I do if I think an AI should do something differently, add a feature, support a newgrf or something like that?==
(A) Find the thread and respectfully ask the author to include it. It's helps if you make your case with some logic. "Newgrf X is very popular and the AI isn't compatible" is a lot more compelling than "I loaded 15 newgrfs in a strange combination and in my custom scenario the AI goes broke half the time." Remember the developers are essentially volunteers. Please treat them with respect.
+
(A) Find the thread and respectfully ask the author to include it. It helps if you make your case with some logic. "Newgrf X is very popular and the AI isn't compatible" is a lot more compelling than "I loaded 15 newgrfs in a strange combination and in my custom scenario the AI goes broke half the time." Remember the developers are essentially volunteers. Please treat them with respect.
  
  
==(Q) How do I start my own AI?==
+
==(Q) How do I start writing my own AI?==
(A) The [url=http://wiki.openttd.org/Noai]NoAi section of the Wiki[/url] should get you going.
+
(A) The [[Noai|NoAi section of the Wiki]] should get you going.
  
 
==(Q) What if I have questions about how to do something in my AI?==
 
==(Q) What if I have questions about how to do something in my AI?==
 
(A) Please feel free to ask on the NoAI board. The other authors will almost always try to help you. They will expect you to take a stab at it and maybe post some code showing what you are trying. Try to ask specific questions.
 
(A) Please feel free to ask on the NoAI board. The other authors will almost always try to help you. They will expect you to take a stab at it and maybe post some code showing what you are trying. Try to ask specific questions.
 +
  
 
==(Q) How do I propose changes to the NoAI API?==
 
==(Q) How do I propose changes to the NoAI API?==
(A) There is a [url=http://www.tt-forums.net/viewtopic.php?f=65&t=44249]thread[/url] for that discussion. Please read the entire thread before posting "new" ideas that are already in there.  
+
(A) There is a [http://www.tt-forums.net/viewtopic.php?f=65&t=44249 thread] for that discussion. Please read the entire thread before posting "new" ideas that are already in there.
 +
 
  
 
==(Q) My AI needs a math function or something else added to Squirrel in order to work?==
 
==(Q) My AI needs a math function or something else added to Squirrel in order to work?==
(A)Refer to the API Idead [url=http://www.tt-forums.net/viewtopic.php?f=65&t=44249]thread[/url]. There is quite a bit of discussion in there about that topic.
+
(A) Refer to the API Ideas [http://www.tt-forums.net/viewtopic.php?f=65&t=44249 thread]. There is quite a bit of discussion in there about that topic.
  
==(Q) The pathfinder libraries are slow. Can I make them faster?==
+
==(Q) Can I add a penalty for level crossings in the library pathfinder?==
(A)Yes. Fanioz [url=http://www.tt-forums.net/viewtopic.php?f=65&t=44699&p=809168&hilit=pathfinder#p809167]has a method[/url].
+
(A) Yes. Fanioz [http://www.tt-forums.net/viewtopic.php?p=809026#p809026 has a method].
  
 
==(Q) I have a question not on this list, should I just ask it here?==
 
==(Q) I have a question not on this list, should I just ask it here?==
(A) Please search the forums first. Spend at least 10-15 minutes searching. When you ask your questions include an searches you tried. Otherwise you are likely to get a terse response to search.
+
(A) Please search the forums first. Spend at least 10-15 minutes searching. When you ask your questions include any searches you tried. Otherwise you are likely to get a terse response to search.
  
 
==(Q) I posted a question and didn't get (a good) answer, what do I do?==
 
==(Q) I posted a question and didn't get (a good) answer, what do I do?==
(A) Make sure your question is answerable. Broad questions like "Does anyone know how to buy an engine?" don't get as much traction as questions like "Why doesn't this code snippet result in an engine getting purchased?". Make sure your question is in the right thread. Saying "This AI should support passengers," in an AI thread is better than asking "Why don't more AI's support passengers," in a general thread.
+
(A) Make sure your question is answerable. Broad questions like "Does anyone know how to buy an engine?" don't get as much traction as questions like "Why doesn't this code snippet result in an engine getting purchased?". Make sure your question is in the right thread. Saying "This AI should support passengers," in an AI thread is better than asking "Why don't more AIs support passengers," in a general thread.
 +
 
 +
==(Q) My AI gives the error "couldn't detect real instance of class for non-static call" when I try to extend a list, what did I do wrong?==
 +
(A) You forget to call the constructor of the parent class. Add in your constructor a call to it.

Latest revision as of 00:03, 30 September 2013



These are Frequently Asked Questions for the NoAI Forum at http://www.tt-forums.net/viewforum.php?f=65

Contents

[edit] NoAI FAQ

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

(A) You can't in OpenTTD. There are a lot of AIs that work in different ways. You should shop around and see if there is one you like.

(A) The nearest match for the old AI's behavior is probably SimpleAI, an effort at reproducing the old AI's strategy in the new AI framework.

[edit] (Q) I don't like any of the new AIs. Can I have the old AI back now?

(A) Sorry, no you still can't. The old AI cheated. A lot. It would terraform for free, ignore the town council's attitude towards a player. The new framework doesn't allow the AI to cheat. It can't do anything you can't do. There are many AIs, some with the express purpose of being good replacements for the old AI. Read on if you want to influence them to be more to your liking.

[edit] (Q) What should I do if an AI crashes?

(A) If you want to be helpful, a screenshot of the red text is appreciated. Be sure to get the whole line. The numbers on the right hand side are important. Please make every effort to get the whole line. Post the screenshot in the AI thread corresponding to the crashed AI.

[edit] (Q) What should I do if I find a bug in an AI?

(A) Please take a good screenshot of the error and post it to the AI's thread. Try to be clear about what you expected and what you saw. Save games can help sometimes, but in a lot of cases the problem is past and a screenshot is just as good.


[edit] (Q) What should I do if I think an AI should do something differently, add a feature, support a newgrf or something like that?

(A) Find the thread and respectfully ask the author to include it. It helps if you make your case with some logic. "Newgrf X is very popular and the AI isn't compatible" is a lot more compelling than "I loaded 15 newgrfs in a strange combination and in my custom scenario the AI goes broke half the time." Remember the developers are essentially volunteers. Please treat them with respect.


[edit] (Q) How do I start writing my own AI?

(A) The NoAi section of the Wiki should get you going.

[edit] (Q) What if I have questions about how to do something in my AI?

(A) Please feel free to ask on the NoAI board. The other authors will almost always try to help you. They will expect you to take a stab at it and maybe post some code showing what you are trying. Try to ask specific questions.


[edit] (Q) How do I propose changes to the NoAI API?

(A) There is a thread for that discussion. Please read the entire thread before posting "new" ideas that are already in there.


[edit] (Q) My AI needs a math function or something else added to Squirrel in order to work?

(A) Refer to the API Ideas thread. There is quite a bit of discussion in there about that topic.

[edit] (Q) Can I add a penalty for level crossings in the library pathfinder?

(A) Yes. Fanioz has a method.

[edit] (Q) I have a question not on this list, should I just ask it here?

(A) Please search the forums first. Spend at least 10-15 minutes searching. When you ask your questions include any searches you tried. Otherwise you are likely to get a terse response to search.

[edit] (Q) I posted a question and didn't get (a good) answer, what do I do?

(A) Make sure your question is answerable. Broad questions like "Does anyone know how to buy an engine?" don't get as much traction as questions like "Why doesn't this code snippet result in an engine getting purchased?". Make sure your question is in the right thread. Saying "This AI should support passengers," in an AI thread is better than asking "Why don't more AIs support passengers," in a general thread.

[edit] (Q) My AI gives the error "couldn't detect real instance of class for non-static call" when I try to extend a list, what did I do wrong?

(A) You forget to call the constructor of the parent class. Add in your constructor a call to it.

Personal tools