JAMI: Just Another Moronic Intelligence

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
Xander
Route Supervisor
Route Supervisor
Posts: 485
Joined: 18 May 2007 12:47
Location: Oxford
Contact:

JAMI: Just Another Moronic Intelligence

Post by Xander »

JAMI: Just Another Moronic Intelligence

JAMI is not intended to change the world. The hope is that, in time, she will become a fun opponent to play against, able to do all the things you do. If she makes you want to bring her along to a multiplayer game, I'll be happy :)

Also, I'm using JAMI to help showcase the new NoAI project space. Below is a complete list of features that the space provides.

==Current Release==
Version 3: Bankers and Trucks
JAMI.tar
Version 3
(69.5 KiB) Downloaded 338 times
If you want to:
  • See recent activity
  • Have a look at the development roadmap
  • Report a bug or see a list of known bugs
  • See planned features and suggest one
  • Read the latest JAMI news
  • Get previous versions
  • Get the source code
Please visit http://noai.openttd.org/projects/show/ai-jami
Last edited by Xander on 13 Aug 2009 07:47, edited 16 times in total.
Real Tycoons do it on Trains!

JAMI: Just Another Moronic Intelligence

User avatar
Xander
Route Supervisor
Route Supervisor
Posts: 485
Joined: 18 May 2007 12:47
Location: Oxford
Contact:

Re: JAMI: Just Another Moronic Intelligence

Post by Xander »

<Reserved for screenshots or something, I don't know.>
Real Tycoons do it on Trains!

JAMI: Just Another Moronic Intelligence

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

Re: JAMI: Just Another Moronic Intelligence

Post by Dustin »

Congrats on your new AI.

I like the log format a lot.

Let me be the first to report a bug.


Code: Select all

dbg: [ai] [2] [I] PROSPECTOR: My analyis shows the best route is from Sendown to Fochester using buses
dbg: [ai] [2] [I] MANAGER: How much will that cost to provide?
dbg: [ai] [2] [W] ADMINISTRATOR: Using TrueAncestors GetBestCargo algorithm
dbg: [ai] [2] [I] ENGINEER: I'm going to suggest the MPS Regal Bus
dbg: [ai] [2] [I] ENGINEER: That will cost 4953
dbg: [ai] [2] [I] ACCOUNTANT: The most we can spend is 299617
dbg: [ai] [2] [I] MANAGER: That's fine by me. Let's get this route built.
dbg: [ai] [2] [I] BUILDER: Constructing a new route
dbg: [ai] [2] [I] BUILDER: Constructing a road station
dbg: [ai] [2] [W] BUILDER: Could not find suitable location
dbg: [ai] [2] [S] Your script made an error: parameter 1 has an invalid type 'bool' ; expected: 'integer'
dbg: [ai] [2] [S]
dbg: [ai] [2] [S] *FUNCTION [BuildRoadStation()] C:\Users\Dustin\Documents\OpenTTD\content_download\ai\JAMI.tar\jami\builder.nut line [123]
dbg: [ai] [2] [S] *FUNCTION [BuildRoute()] C:\Users\Dustin\Documents\OpenTTD\content_download\ai\JAMI.tar\jami\builder.nut line [23]
dbg: [ai] [2] [S] *FUNCTION [BuildNewRoute()] C:\Users\Dustin\Documents\OpenTTD\content_download\ai\JAMI.tar\jami\manager.nut line [45]
dbg: [ai] [2] [S] *FUNCTION [Run()] C:\Users\Dustin\Documents\OpenTTD\content_download\ai\JAMI.tar\jami\manager.nut line [21]
dbg: [ai] [2] [S] *FUNCTION [Start()] C:\Users\Dustin\Documents\OpenTTD\content_download\ai\JAMI.tar\jami\main.nut line [40]
dbg: [ai] [2] [S]
dbg: [ai] [2] [S] [tile] true
dbg: [ai] [2] [S] [stationtype] 4
dbg: [ai] [2] [S] [destination] 141684
dbg: [ai] [2] [S] [site] 151960
dbg: [ai] [2] [S] [this] INSTANCE
dbg: [ai] [2] [S] [end] 141684
dbg: [ai] [2] [S] [start] 151960
dbg: [ai] [2] [S] [route] INSTANCE
dbg: [ai] [2] [S] [this] INSTANCE
dbg: [ai] [2] [S] [vehicle_cost] 4953
dbg: [ai] [2] [S] [max_infra_cost] 0
dbg: [ai] [2] [S] [best_route] INSTANCE
dbg: [ai] [2] [S] [MaximumCost] 300000
dbg: [ai] [2] [S] [this] INSTANCE
dbg: [ai] [2] [S] [this] INSTANCE

User avatar
Xander
Route Supervisor
Route Supervisor
Posts: 485
Joined: 18 May 2007 12:47
Location: Oxford
Contact:

Re: JAMI: Just Another Moronic Intelligence

Post by Xander »

Dustin wrote:Congrats on your new AI.

I like the log format a lot.

Let me be the first to report a bug.

snip
Many thanks. Fixed in 0.2.

Glad you liked the log format. I loved the idea of having the whole thing laid out like some kind of horrendous board meeting so anyone can listen in on JAMI's thought process.
Real Tycoons do it on Trains!

JAMI: Just Another Moronic Intelligence

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

Re: JAMI: Just Another Moronic Intelligence

Post by Zuu »

Nice to see you post your AI you have been kept talking about. I would just want to point out that your use of decimal point versions is not compatible with BaNaNaS. It only accept integer version numbers. So I rather just start on 1, 2, 3, 4 etc. or use release dates or whatever as what GetVersion() (or whatever that function now was called) returns and what you put in BaNaNaS. The important for OpenTTD and BaNaNaS is that a newer version has a higher number and that all numbers are integers. Probably 32 bit unsigned integers, but I don't really know what the upper limit is.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)

User avatar
Xander
Route Supervisor
Route Supervisor
Posts: 485
Joined: 18 May 2007 12:47
Location: Oxford
Contact:

Re: JAMI: Just Another Moronic Intelligence

Post by Xander »

Zuu wrote:Nice to see you post your AI you have been kept talking about. I would just want to point out that your use of decimal point versions is not compatible with BaNaNaS. It only accept integer version numbers. So I rather just start on 1, 2, 3, 4 etc. or use release dates or whatever as what GetVersion() (or whatever that function now was called) returns and what you put in BaNaNaS. The important for OpenTTD and BaNaNaS is that a newer version has a higher number and that all numbers are integers. Probably 32 bit unsigned integers, but I don't really know what the upper limit is.
Cool. Not a problem right now as I have no intention of putting her anywhere near Bananas until version 1 anyway :)
Real Tycoons do it on Trains!

JAMI: Just Another Moronic Intelligence

User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2366
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: JAMI: Just Another Moronic Intelligence

Post by Lord Aro »

looks like fun :tongue:
will certainly download it as soon as i'm on a computer that has openttd on it(and i don't forget :roll: )
AroAI - A really feeble attempt at an AI

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra

KIDS
Engineer
Engineer
Posts: 9
Joined: 05 Aug 2009 11:28

Re: JAMI: Just Another Moronic Intelligence

Post by KIDS »

Gotta say I love the board meeting style. I'll be sure to give it a go a bit later and report with any bugs.

What exactly differentiates it from AIs like NoCAB and Convoy, btw? In game, differences can be hard to see, but code is probably very different... or not?

User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2366
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: JAMI: Just Another Moronic Intelligence

Post by Lord Aro »

i'm afraid that as soon as i started it up it crashed
here's the debug
Attachments
Unnamed, 26th Jun 1950.png
JAMI error
(188.72 KiB) Downloaded 121 times
AroAI - A really feeble attempt at an AI

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra

User avatar
Xander
Route Supervisor
Route Supervisor
Posts: 485
Joined: 18 May 2007 12:47
Location: Oxford
Contact:

Re: JAMI: Just Another Moronic Intelligence

Post by Xander »

KIDS wrote:Gotta say I love the board meeting style. I'll be sure to give it a go a bit later and report with any bugs.

What exactly differentiates it from AIs like NoCAB and Convoy, btw? In game, differences can be hard to see, but code is probably very different... or not?
JAMI seems to have a lot more component files than most of the other AI's (if you don't include graphs/models and the like). I've not really peered into many other AI's other than TrueAncestor and Convoy (I really couldn't get my head around building bus stations) and the only thing that really stood out is how many classes JAMI has. I think she might also be the only one who pathfinds before she pathfinds.
Lord Aro wrote:i'm afraid that as soon as i started it up it crashed
here's the debug
Please see above - spotted and fixed for next version. But thanks anyway.
Real Tycoons do it on Trains!

JAMI: Just Another Moronic Intelligence

User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2366
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: JAMI: Just Another Moronic Intelligence

Post by Lord Aro »

oh right
and i'm guessing (unless i'm being really stupid) you haven't uploaded 0.2 yet
AroAI - A really feeble attempt at an AI

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra

User avatar
Xander
Route Supervisor
Route Supervisor
Posts: 485
Joined: 18 May 2007 12:47
Location: Oxford
Contact:

Re: JAMI: Just Another Moronic Intelligence

Post by Xander »

Lord Aro wrote:oh right
and i'm guessing (unless i'm being really stupid) you haven't uploaded 0.2 yet
Nope, but you can get to the source code here if you want to apply the fix yourself :)

Otherwise, 0.2 should be out soon, probably when JAMI can handle trucks.
Real Tycoons do it on Trains!

JAMI: Just Another Moronic Intelligence

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

Re: JAMI: Just Another Moronic Intelligence

Post by Brumi »

Congratulations for your AI! :)
I'm testing it right now and there is no crash or serious bug in the first 3 years. The only problem is that there is only 1 bus running on each line.
And I agree with the others that the log is really fun to read :)

User avatar
Xander
Route Supervisor
Route Supervisor
Posts: 485
Joined: 18 May 2007 12:47
Location: Oxford
Contact:

Re: JAMI: Just Another Moronic Intelligence

Post by Xander »

Brumi wrote:Congratulations for your AI! :)
I'm testing it right now and there is no crash or serious bug in the first 3 years. The only problem is that there is only 1 bus running on each line.
And I agree with the others that the log is really fun to read :)
That's fully intended right now. There will be a new task assigned to the Administrator to MaximiseStationPerformance later on.
Real Tycoons do it on Trains!

JAMI: Just Another Moronic Intelligence

User avatar
Xander
Route Supervisor
Route Supervisor
Posts: 485
Joined: 18 May 2007 12:47
Location: Oxford
Contact:

Re: JAMI: Just Another Moronic Intelligence

Post by Xander »

Version 0.2 is now available. See first post.

A few minor changes and that bug has been fixed. I ran her quite successfully for 30 years on a random map. Here's what she did:
JAMI Network.PNG
(33.41 KiB) Downloaded 122 times
It's going right on the fridge :lol:

EDIT: Quick note - I've renamed/reorganised the version system to match the new roadmap
Real Tycoons do it on Trains!

JAMI: Just Another Moronic Intelligence

Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: JAMI: Just Another Moronic Intelligence

Post by Roujin »

You're quite the entertainer I must say :) I enjoyed both the debug output the others mentioned already, and your roadmap.
"If only these two collided more often..." - hilarious :lol:

I wish you good luck with your AI. May it grow to have a distinct style not only in code but also in gameplay, and compete well against the other AIs, of course ;)
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage

User avatar
Michiel
Transport Coordinator
Transport Coordinator
Posts: 313
Joined: 13 Jul 2008 00:57
Contact:

Re: JAMI: Just Another Moronic Intelligence

Post by Michiel »

Xander wrote:It's going right on the fridge :lol:
Hahaha, congrats and good luck :D

Wasila
Tycoon
Tycoon
Posts: 1498
Joined: 15 Mar 2008 07:02

Re: JAMI: Just Another Moronic Intelligence

Post by Wasila »

I'm going to add this to my game - we'll see how well it copes with cargodist :evil:

User avatar
Xander
Route Supervisor
Route Supervisor
Posts: 485
Joined: 18 May 2007 12:47
Location: Oxford
Contact:

Re: JAMI: Just Another Moronic Intelligence

Post by Xander »

Wasila wrote:I'm going to add this to my game - we'll see how well it copes with cargodist :evil:
Theoretically, terribly, as cargo dest isn't in trunk yet and I don't run it on my machine. She'll certainly be taught how to use it if it goes into trunk though (and the NoAI API is updated accordingly).


EDIT: cargodest/cargodist; same difference - I don't use them. Teaching JAMI to find her ass with both hands is hard enough. Trying to teach her things that aren't even in trunk yet is just masochistic :|
Real Tycoons do it on Trains!

JAMI: Just Another Moronic Intelligence

Wasila
Tycoon
Tycoon
Posts: 1498
Joined: 15 Mar 2008 07:02

Re: JAMI: Just Another Moronic Intelligence

Post by Wasila »

What is JAMI's technical name? start_ai jami fails to work.

Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: Bing [Bot] and 2 guests