FreeOrion

Forums for the FreeOrion project
It is currently Wed Jun 19, 2013 2:48 am

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: InvasionAI Module Bundle for v0.3.17
PostPosted: Thu Dec 15, 2011 10:34 pm 
Offline
Space Floater

Joined: Sat Sep 24, 2011 4:39 pm
Posts: 44
The ten (10) modified and three (3) new AI modules in the attached zip file have been run successfully on FO v0.3.17 [SVN 4282] MSVC 2010. (They will not run successfully on newer builds that include tech tree changes.)

These modifications add the following AI capabilities:

1. production of new scout ships
2. production of new troop ships
3. production of outpost ships
4. outpost colonization capability
5. planet invasion capability
6. improved research queue selection
7. resource focus changes on an empire’s capital planet

These modifications do not add armed ship attack capability.

I release my contribution under the terms of the Creative Commons Attribution-ShareAlike 3.0 and GNU GPL 2.0 licenses to anyone who may be interested in testing this InvasionAI Module Bundle in FO v0.3.17.


Attachments:
GA_Contribution_02.zip [20.77 KiB]
Downloaded 8 times
Top
 Profile  
 
 Post subject: Re: InvasionAI Module Bundle for v0.3.17
PostPosted: Fri Dec 16, 2011 12:20 am 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 8055
Location: Vancouver, BC
I tweaked the ResearchAI code a bit to work with the modified API for the SVN version, and I'm now getting some errors that suggest a logic issue:
Code:
2011-12-15 16:17:29,856 DEBUG AI : issuing fleet orders:
2011-12-15 16:17:29,856 DEBUG AI :     fleet order[1] source:{5:233} target:{3:47}
2011-12-15 16:17:29,856 DEBUG AI :     fleet order[9] source:{5:235} target:{2:183}
2011-12-15 16:17:29,857 ERROR AI : AIInterface::IssueInvadeOrder : planet with passed planet_id is owned by this empire so cannot be invaded
2011-12-15 16:17:29,857 DEBUG AI :     fleet order[1] source:{5:235} target:{3:27}
2011-12-15 16:17:29,857 DEBUG AI :     fleet order[1] source:{5:240} target:{3:41}
2011-12-15 16:17:29,857 DEBUG AI :     fleet order[9] source:{5:273} target:{2:183}
2011-12-15 16:17:29,857 ERROR AI : AIInterface::IssueInvadeOrder : planet with passed planet_id is owned by this empire so cannot be invaded
2011-12-15 16:17:29,857 DEBUG AI :     fleet order[1] source:{5:273} target:{3:27}
2011-12-15 16:17:29,857 DEBUG AI :     fleet order[1] source:{5:242} target:{3:6}


Top
 Profile  
 
 Post subject: Re: InvasionAI Module Bundle for v0.3.17
PostPosted: Fri Dec 16, 2011 1:47 am 
Offline
Space Floater

Joined: Sat Sep 24, 2011 4:39 pm
Posts: 44
Geoff the Medio wrote:
I tweaked the ResearchAI code a bit to work with the modified API for the SVN version, and I'm now getting some errors that suggest a logic issue:

I have not run into that particular error message.

I have seen a couple of cases where two (2) different empires with entirely different population counts have claimed ownership of the same planet during the same turn. But those anomalies didn’t generate any type of error messages. And, I doubt that those anomalies have anything to do with the AI program. I didn’t report those anomalies because one would have to have access to modified AI log printouts, similar to mine, to see them.

Let me take a look at how I’ve selected planets for invasion in the InvasionAI module. I suspect that any problem will be right there and should be easy to fix. (I did have a similar, but not identical problem, a while back.) Give me a day, or so, to take a hard look at that particular area, and I’ll get back to you.


Top
 Profile  
 
 Post subject: Re: InvasionAI Module Bundle for v0.3.17
PostPosted: Fri Dec 16, 2011 2:24 am 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 8055
Location: Vancouver, BC
Gray Area wrote:
I have not run into that particular error message.
These messages are appearing after ending turn once, so nothing fancy is happening to set up the relevant situation.


Attachments:
File comment: AI log after starting new game and ending turn once.
AI_1.log [26.5 KiB]
Downloaded 10 times
Top
 Profile  
 
 Post subject: Re: InvasionAI Module Bundle for v0.3.17
PostPosted: Fri Dec 16, 2011 2:58 pm 
Offline
Space Floater

Joined: Sat Sep 24, 2011 4:39 pm
Posts: 44
Geoff the Medio wrote:
Gray Area wrote:
I have not run into that particular error message.
These messages are appearing after ending turn once, so nothing fancy is happening to set up the relevant situation.

You are correct. I found that error message when I went looking for it. It was there all along and I didn’t notice it, as the InvasionAI module appeared to be invading in spite of the error.

I fixed that particular problem and have attached the three (3) modified modules.

Again, I release my contribution under the terms of the Creative Commons Attribution-ShareAlike 3.0 and GNU GPL 2.0 licenses.

Now, however, I’m seeing the following error message:

AIInterface::IssueInvadeOrder : planet with passed planet_id is not colonized

I believe this error message is appearing because the AI empires can not invade ‘monster populated planets’, that is planets that are not owned by other actual empires.

To test this theory, I played a passive game. I watched AI troop ships enter ‘monster populated systems’ and fail to capture any planets. When I, however, captured the same ‘monster planets’, the AI’s troop ships were able to invade and capture them from me.

I do not believe there is anything I can do to correct this problem from within the AI program. I suspect this problem is being caused by something within the AIInterface.


Attachments:
GA_Contribution_02a.zip [5.46 KiB]
Downloaded 13 times
Top
 Profile  
 
 Post subject: Re: InvasionAI Module Bundle for v0.3.17
PostPosted: Fri Dec 16, 2011 10:41 pm 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 8055
Location: Vancouver, BC
Gray Area wrote:
I’m seeing the following error message:

AIInterface::IssueInvadeOrder : planet with passed planet_id is not colonized

I believe this error message is appearing because the AI empires can not invade ‘monster populated planets’, that is planets that are not owned by other actual empires.
Indeed; the safety checks in the AI interface code were different from the checks in the SidePanel UI code. I am / have made them more similar, so that should be fixed soon...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group