Page 1 of 4

JAMI: Just Another Moronic Intelligence

Posted: 09 Aug 2009 23:13
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 474 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

Re: JAMI: Just Another Moronic Intelligence

Posted: 09 Aug 2009 23:15
by Xander
<Reserved for screenshots or something, I don't know.>

Re: JAMI: Just Another Moronic Intelligence

Posted: 10 Aug 2009 01:12
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

Re: JAMI: Just Another Moronic Intelligence

Posted: 10 Aug 2009 06:12
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.

Re: JAMI: Just Another Moronic Intelligence

Posted: 10 Aug 2009 06:55
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.

Re: JAMI: Just Another Moronic Intelligence

Posted: 10 Aug 2009 06:59
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 :)

Re: JAMI: Just Another Moronic Intelligence

Posted: 10 Aug 2009 07:13
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: )

Re: JAMI: Just Another Moronic Intelligence

Posted: 10 Aug 2009 08:02
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?

Re: JAMI: Just Another Moronic Intelligence

Posted: 10 Aug 2009 08:20
by Lord Aro
i'm afraid that as soon as i started it up it crashed
here's the debug

Re: JAMI: Just Another Moronic Intelligence

Posted: 10 Aug 2009 08:48
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.

Re: JAMI: Just Another Moronic Intelligence

Posted: 10 Aug 2009 08:58
by Lord Aro
oh right
and i'm guessing (unless i'm being really stupid) you haven't uploaded 0.2 yet

Re: JAMI: Just Another Moronic Intelligence

Posted: 10 Aug 2009 09:11
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.

Re: JAMI: Just Another Moronic Intelligence

Posted: 10 Aug 2009 12:18
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 :)

Re: JAMI: Just Another Moronic Intelligence

Posted: 10 Aug 2009 12:21
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.

Re: JAMI: Just Another Moronic Intelligence

Posted: 10 Aug 2009 20:32
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
JAMI Network.PNG (33.41 KiB) Viewed 2011 times
It's going right on the fridge :lol:

EDIT: Quick note - I've renamed/reorganised the version system to match the new roadmap

Re: JAMI: Just Another Moronic Intelligence

Posted: 11 Aug 2009 04:39
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 ;)

Re: JAMI: Just Another Moronic Intelligence

Posted: 11 Aug 2009 07:41
by Michiel
Xander wrote:It's going right on the fridge :lol:
Hahaha, congrats and good luck :D

Re: JAMI: Just Another Moronic Intelligence

Posted: 11 Aug 2009 08:40
by Wasila
I'm going to add this to my game - we'll see how well it copes with cargodist :evil:

Re: JAMI: Just Another Moronic Intelligence

Posted: 11 Aug 2009 08:59
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 :|

Re: JAMI: Just Another Moronic Intelligence

Posted: 11 Aug 2009 10:05
by Wasila
What is JAMI's technical name? start_ai jami fails to work.