InvasionAI Module

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderator: Committer

Post Reply
Message
Author
Gray Area
Space Squid
Posts: 89
Joined: Sat Sep 24, 2011 4:39 pm

InvasionAI Module

#1 Post by Gray Area »

I haven’t seen any mention of any other programming activity on the AI’s military capabilities in this forum. Therefore, I’ve started work on an InvasionAI module. My intention is to utilize the existing ColonnisationAI module as a pattern for the new module.

To date, I have made numerous modifications to the AI, including changing the Resource Focus on the other empire’s homeworlds, prioritizing the production of Colony Ships, introducing the production of replacement Scouts, etc. Unfortunately, none of these modifications have made much of an improvement in the AI’s overall capabilities.

I don’t expect the addition of an InvasionAI module, in itself, to be a major improvement. But, it will represent a first attempt at giving the AI some offensive military capability.

Gray Area
Space Squid
Posts: 89
Joined: Sat Sep 24, 2011 4:39 pm

Re: InvasionAI Module

#2 Post by Gray Area »

Please consider adding the property “canInvade” to the class ShipDesign in the PythonUniverseWrapper.cpp file, and whatever other files might be affected.

This property already exists in the Ship class.

The similar property “canColonize” exists in both the Ship and ShipDesign classes.

Having this property added would permit shipdesign.canInvade to function within the AI modules in the same way that shipdesign.canColonize currently functions.

This is a ‘nice to have’ rather than an essential property, by the way. The InvasionAI module does not absolutely require it.

As I am currently working on only the AI modules, I request that programmers working on the main program consider making this property addition.

Thank you.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: InvasionAI Module

#3 Post by Geoff the Medio »

Gray Area wrote:Please consider adding the property “canInvade” to the class ShipDesign in the PythonUniverseWrapper.cpp file...
Done. (Also added isArmed and isMonster)

Gray Area
Space Squid
Posts: 89
Joined: Sat Sep 24, 2011 4:39 pm

Re: InvasionAI Module

#4 Post by Gray Area »

Geoff the Medio wrote:
Gray Area wrote:Please consider adding the property “canInvade” to the class ShipDesign in the PythonUniverseWrapper.cpp file...
Done. (Also added isArmed and isMonster)
Thanks.

I’ve managed to complete a functional InvasionAI module, by the way.

I need to ‘tune’ the PriorityAI module a bit and cleanup all of the other modules I’ve modified or written. Then, in a few days, I’ll post the bundle up in the General Discussion Forum. Perhaps, some other players might be interested in downloading the modules and testing them out in FO v0.3.17 [SVN 4282] MSVC 2010.

I realized that I’m already dealing with three (3) overlapping learning curves: Relearning how to program (it’s been a while for me), learning the Python programming language, and figuring out the inner workings of someone else’s complex AI program. Therefore, I’m less than enthusiastic about taking on a fourth (4th) learning curve right now, the one that would involve me in trying to figure out how to compile the latest version of FO. So, I’m going to continue working with FO v0.3.17 for now, as it is stable for me, and start work on a functional MilitaryAI module, while the new module's requirements are still fresh in my mind.

Post Reply