Page 1 of 3

Programmer Challenge: create an OpenTTD AI

Posted: 01 Feb 2008 15:42
by Corniel
The Dutch software company I'm working for (Tjip) is planning it's second Programmer Challenge. Last year the participants had to make an awale engine. This year we were searching for something different. One of the ideas is writing an AI for OpenTTD.

Ofcourse I did some research: read some stuff at this forum, downloaded the source code (also the NoAI branch), read the wiki, built the application. Furthermore, I played the game for a while. :D

Anyway, there are some issues who have to been solved:
  • Possibility to run different AI's at the same time;
  • Possibility to configure different AI's;
  • Graphics. We don't have problems with buying the original (for every participant, for $4,99 each) but its more practical to give some downloadable binaries (and not are redone at the moment?!);
  • Not all stuff is implemented yet in NoAI;
  • Issues because all AI's have to run on the same machine (CPU, memory, etc.).
My questions are (ofcourse): Are here people who want to help solve some of the problems? Do you think it can be done anyway? And last but not least, are There people who want to compete?

Re: Programmer Challenge: create an OpenTTD AI

Posted: 01 Feb 2008 17:10
by CMircea
Yes it can be done, but we there are more important things than an AI. Many people don't use the AI and play online instead. How about making a PBS system, based on the new proposed one, that will be good to be included in trunk? I bet that TONS of players will love that over a competent AI.

Re: Programmer Challenge: create an OpenTTD AI

Posted: 01 Feb 2008 21:11
by Rubidium
Desolator: there is no "whom's PBS is best" contest that can be hold. It either works or it does not work.

NoAI can run different AIs at the same time, it's just that it either randomly starts ones or you force it to be a single AI via the command line. So it's basically the same AI configuration problem.

The graphics is not something I can really talk about; primarily because I have no idea how it's going (do not have time to follow that).

What do you mean with "not all stuff is implemented in NoAI"? The goal of NoAI was to get a useable framework as soon as possible and then extend it further. Ships and aircraft would be too simple for AIs, whereas trains would take too much time to develop a framework for 'just' to test stuff. Now there is a working system that allows one to create a road vehicle AI (without tunnels and bridges though). Implementing the rest is not hard, it just takes a lot of time.

The reason that NoAI is currently stalled is that the devs (TrueBrain and myself) that worked on it have no time to continue it at the moment. For both real-life things that are more important (by far the biggest cause) and the fact that we would really want to get 0.6.0 released too.

The AIs running on the same machine shouldn't be much of a problem. There can only be one AI that is running at a time. However, the AI will have to 'hand' the control back to OpenTTD when it is done with the stuff it wants to do. This can be either by using a 'sleep' command or by the fact that every action that changes the game state explicitly returns the control to OpenTTD and it will then only return the control once the command has been executed, which is at least in the next game tick.

I would love to help with the problems, but as I said before I have some real-life stuff that will take virtually *all* my time the next two months to the extend that it's likely that I will be unreachable for most parts of the next two months.

Competing AIs is something that has been thought about before as way to get some good AIs for OpenTTD, but we never actually had a contest because there are only a few AIs. Whether the number of AIs will grow when the challenge starts is something I cannot tell anything meaningful about.

Posted: 01 Feb 2008 23:05
by Corniel
Rubidium wrote:NoAI can run different AIs at the same time, it's just that it either randomly starts ones or you force it to be a single AI via the command line. So it's basically the same AI configuration problem.
Well I supose it's not that hard to fix. I Just need to find out how it can be done best.
The graphics is not something I can really talk about; primarily because I have no idea how it's going (do not have time to follow that).
No wories. It's no big deal, it was just a 'beside' question.
What do you mean with "not all stuff is implemented in NoAI"? The goal of NoAI was to get a useable framework (..)
Well I did read what was implemented. Ofcourse, planes and ships are 'to easy', but espacialy planes can be realy profitable. I didn't had the time yet to test some stuff myself (I try to this weekend) but I'll try to do this weekend.
The reason that NoAI is currently stalled is that the devs (..) that worked on it have no time to continue it at the moment.
Fair enough ofcourse. But before I give an advise to my company, I have to be sure, that we can do our challenge whithout the risk of going over budget (too far), and that depands ofcourse mostly on what still has to be done. Futhermore, I hope you (the OpenTTD comunity) can help me/us with some details.

I hope that I'm still a 'fan' after a weekend trying to run an engine myself. :D

Re: Programmer Challenge: create an OpenTTD AI

Posted: 03 Feb 2008 21:07
by Noldo
BTW, Where did you find that price for buying the game.

I googled and found only used ones on amazon.

Re: Programmer Challenge: create an OpenTTD AI

Posted: 04 Feb 2008 07:31
by Corniel
Noldo wrote:BTW, Where did you find that price for buying the game.
www.classicgamingpresents.com

Re: Programmer Challenge: create an OpenTTD AI

Posted: 04 Feb 2008 07:50
by peter1138
Sorry, that site is not a legitimate place to purchase:
http://www.classicgamingpresents.com/Terms.htm wrote:Disclaimer:


What does CGPT Ltd Offer? We offer our customers an Installer which patches various
old classic games to make them work on newer versions of Windows (XP & Vista). We
do not in anyway sell the actual games, we only give them away for free as abandonware..

Purchase TTD

Posted: 04 Feb 2008 11:46
by Corniel
peter1138 wrote:Sorry, that site is not a legitimate place to purchase (..)
Tanx for poiting that out. I missed that. In that case http://www.tycoongames.net, and the games costs uit $12.95. Not as cheap as $4.99, but still not the problem.

Re: Programmer Challenge: create an OpenTTD AI

Posted: 04 Feb 2008 15:16
by Korenn
The graphics replacement project that allows playing of ottd without a copy of TTD is still being developed, the intermediate results can be seen in the graphics forum. It's going at a steady pace currently, but it depends solely on the time invested by a group of volunteering artists, so there is no guarantee that it will be finished by any predictable date.

I think this initiative is great, and if the framework for an AI contest is created and released (which you would have to do, it is an open source project ;) ) this can be used to hold more such competitions to get to better and better AIs.

It's even more interesting to create AIs that aren't just going for the maximum profit, but if some would for instance also try to sabotage other players, or act as a convincing human player, or even build realistic looking railways like the people in the screenshot forum.

Re: Programmer Challenge: create an OpenTTD AI

Posted: 19 Feb 2008 09:00
by Corniel
Well some interesting movement. My colleague (Morloth) have made some changes/adds at the NoAI branch. Great stuff, as far as I can see. Furthermore, another colleague is working on a module who allows to configurative which AI’s should play at the same time.

As Morloth pointed out elsewhere, at the moment we are planning only to allow cars, because of the complexity, and the support. Maybe we will allow the others (planes, ships, trains) as well, we will see.

When we have more information, we let you know.

Re: Programmer Challenge: create an OpenTTD AI

Posted: 21 Feb 2008 10:38
by Corniel
Corniel wrote:
  • Graphics. We don't have problems with buying the original (for every participant, for $4,99 each) but its more practical to give some downloadable binaries (and not are redone at the moment?!); (..)
Korenn wrote:The graphics replacement project that allows playing of ottd without a copy of TTD is still being developed, the intermediate results can be seen in the graphics forum. It's going at a steady pace currently, but it depends solely on the time invested by a group of volunteering artists, so there is no guarantee that it will be finished by any predictable date. (..)
There is good news from the graphics part of the Challenge. Atari - current owner of the rights of TTD – officially allows us to use and distribute the graphics and sound binaries, free of charge. So this problem is solved. 8)

Re: Programmer Challenge: create an OpenTTD AI

Posted: 21 Feb 2008 11:15
by peter1138
Corniel wrote:There is good news from the graphics part of the Challenge. Atari - current owner of the rights of TTD – officially allows us to use and distribute the graphics and sound binaries, free of charge. So this problem is solved. 8)
*BLINK* Pardon? Cite?

Re: Programmer Challenge: create an OpenTTD AI

Posted: 21 Feb 2008 11:36
by nautre125
This will have interresting consequences.

Re: Programmer Challenge: create an OpenTTD AI

Posted: 21 Feb 2008 12:02
by Corniel
peter1138 wrote:*BLINK* Pardon? Cite?
Yes, well read... :roll: :D :roll:
nautre125 wrote:This will have interresting consequences.
I think so. We had contact with somebody from Atari Benelux (Belgium, The Netherlands and Luxembourgh). I have no reason to believe this should only apply to those countries.

Re: Programmer Challenge: create an OpenTTD AI

Posted: 21 Feb 2008 12:07
by XeryusTC
Corniel wrote:
peter1138 wrote:*BLINK* Pardon? Cite?
Yes, well read... :roll: :D :roll:
I think that he means that you should cite the text in which Atari allows it. Just some random person on a forum saying it is possible isn't really official and could get the devs into trouble.

Re: Programmer Challenge: create an OpenTTD AI

Posted: 21 Feb 2008 12:47
by Corniel
XeryusTC wrote:I think that he means that you should cite the text in which Atari allows it. Just some random person on a forum saying it is possible isn't really official and could get the devs into trouble.
Good point. Unfortunately there are two problems:
  1. There email disclaimer says that it is confidential so I’m not sure, if I am allowed to cite;
  2. It’s in Dutch. Most people here wouldn’t be able to read it.
I’ll discus this with my project manager, and hope to be able to inform you on this, as soon as possible.

Re: Programmer Challenge: create an OpenTTD AI

Posted: 21 Feb 2008 12:55
by Noldo
So they are giving permission to something but don't want others to know what is it that they are giving the permission for.

Re: Programmer Challenge: create an OpenTTD AI

Posted: 21 Feb 2008 13:07
by planetmaker
Corniel wrote:
XeryusTC wrote:I think that he means that you should cite the text in which Atari allows it. Just some random person on a forum saying it is possible isn't really official and could get the devs into trouble.
Good point. Unfortunately there are two problems:
  1. There email disclaimer says that it is confidential so I’m not sure, if I am allowed to cite;
  2. It’s in Dutch. Most people here wouldn’t be able to read it.
I’ll discus this with my project manager, and hope to be able to inform you on this, as soon as possible.
I'm neither a lawer nor am I'm familiar with the Dutch laws. But to my knowledge - at least in German regulations - these standard disclaimers you find usually under business e-mails have no legal effect. But of course it might affect your relation to them, should they not like your behaviour or the disclosure should give rise to compensation claims. Both things I doubt in this case, though.

Re: Programmer Challenge: create an OpenTTD AI

Posted: 21 Feb 2008 13:21
by jdevreede
Me being that project manager Corniel refers to. Let me add my bit.

I have asked permision to Atari for the specific purpose of making copies for participants in our programmer challenge. They gave us that permision.

I would not co as far as claiming the gave broad permision to make copies to everyone; it's just for our specific goal.

Re: Programmer Challenge: create an OpenTTD AI

Posted: 21 Feb 2008 13:41
by peter1138
Indeed not. However, any of our (the community's) previous attempts to contact Atari have failed, usually with confusion over whether Atari actually have the rights...

I understand that Redboss' Train Tycoon has rights to use the TTD graphics from Chris Sawyer (or his Agency) directly. (Although looking at their website the graphics do not look like the originals.)