.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Space Empires: IV & V (http://forum.shrapnelgames.com/forumdisplay.php?f=20)
-   -   AI Research Builder (http://forum.shrapnelgames.com/showthread.php?t=29630)

Fyron July 23rd, 2006 04:39 PM

AI Research Builder
 
At the request of Kwok (on IRC), I made a little program that will read in a mod's TechArea.txt file and allow you to construct a basic AI_Research.txt file. I figured I might as well share it with all.

The program requires the .NET framework, at least version 1.1. To use it, extract it into a mod folder (or the root SE4 folder) and run it. It is configured to read in the file in a Data folder. It will create the output file AI_Research.txt in the same folder as the exe, as you will likely want to review it first before adding it to a mod or race.

Note that it should be considered as beta, though it does seem to work perfectly for us at this point. Suggestions for improvement are welcome!

AI Research Builder 0.07

Edit:

I should also mention that it does not add levels of tech areas that will be provided by the "start level" setting. Thus, you will not see Ship Construction (1) in stock.

Ed Kolis July 23rd, 2006 04:48 PM

Re: AI Research Builder
 
... Fyron made a .NET program??? http://forum.shrapnelgames.com/images/smilies/eek.gif

Fyron July 23rd, 2006 05:07 PM

Re: AI Research Builder
 
Don't worry, it is c++.

Atrocities July 23rd, 2006 05:35 PM

Re: AI Research Builder
 
Fyrons first program.... http://forum.shrapnelgames.com/images/smilies/happy.gif One day we will look back upon this moment and say.... what was I thinking downloading that! http://forum.shrapnelgames.com/images/smilies/laugh.gif Nice job Fyron, this might become a very helpful tool.

Captain Kwok July 23rd, 2006 05:39 PM

Re: AI Research Builder
 
I have actually had Fyron and SJ each make a program. I ended up going with Fyron's because it was more of what I wanted for my application. It's a handy little program. http://forum.shrapnelgames.com/image...ies/tongue.gif

Fyron July 23rd, 2006 06:18 PM

Re: AI Research Builder
 
This is definitely not my first program. http://forum.shrapnelgames.com/images/smilies/wink.gif

I have uploaded a new version that will compress repeated levels of a tech area into a single research entry. Thus, if you have:

Ships 1
Ships 2
Ships 3
Physics 1
Ships 4

The research file will contain entries for:

Ships 3
Physics 1
Ships 4

Rollo July 24th, 2006 04:30 AM

Re: AI Research Builder
 
Nice tool. I'd have some feature requests, but will save them for later when I have more time.
For now I recommend using 34 as the default value for Min Percent.

Fyron July 24th, 2006 04:39 AM

Re: AI Research Builder
 
Any particular reason for 34 over 25?

Captain Kwok July 24th, 2006 09:31 AM

Re: AI Research Builder
 
I prefer 25 myself, particularly for the start of the game. However, 33 can have an advantage in that you can research a pre-req tech area and research the uncovered tech area fairly quickly after...

Rollo July 24th, 2006 03:18 PM

Re: AI Research Builder
 
Quote:

Imperator Fyron said:
Any particular reason for 34 over 25?

Yes, 34 makes a more focused research.

Quote:

33 can have an advantage in that you can research a pre-req tech area and research the uncovered tech area fairly quickly after...

33 is no different compared to 25. The AI will research the same amount of projects at the same time.
3 projects at 33 only add up to 99, causing the AI to add a 4th project.

Urendi Maleldil July 24th, 2006 03:59 PM

Re: AI Research Builder
 
This research builder is a great little program. Is there any way to load in an existing AI research file?

Fyron July 24th, 2006 07:11 PM

Re: AI Research Builder
 
The program wasn't really designed around editing existing research files. I can see about implementing such functionality though.

One potential issue is that loading from an existing research file would eliminate any carefully crafted min percent settings in the file. Not a problem if you tend to just use one value throughout, of course.

Fyron July 25th, 2006 04:49 AM

Re: AI Research Builder
 
Another thought: I do not care to implement separate lists based on AI states. The current version makes all techs in the research file configured for all states. If I try to load in complex AI research files that have a bunch of tech lines based on specific states, everything will break down. I dunno how many AIs do things with separate states in the research file though, other than bumping up stellar manipulation for not-connected.

Captain Kwok July 25th, 2006 10:04 AM

Re: AI Research Builder
 
SJ's version of the program has checkboxes with the various AI states, but I don't think it's really necessary. In 99% of the files all states are specified with special entries for not connected. I suspose some really enthusiastic AI modder might like to optimize a file for individual AI states, but I can see that actually causing more problems for the AI (ie AI never comes back to research a tech because it never comes back to a state).

Fyron July 26th, 2006 03:34 PM

Re: AI Research Builder
 
This version has the capacity to load existing AI research files. It does not currently handle AI states, however. It will add a tech area level only the first time it is seen. Thus, if you have, say, Stellar Manipulation 3 occuring early in a file in a Not Connected state, it will be added then as the file is read. The normal appearance of the tech area later (up to level 3) in general states will not be added to the research file. Higher levels will of course be added. I have not yet decided how to handle mulitple appearances in different states.

Note that the AI Research file created by the program is still located in the program dir. It will NOT overwrite any existing files in the AI folder.

AI Research Builder 0.08

Urendi Maleldil July 26th, 2006 04:11 PM

Re: AI Research Builder
 
Maybe have a tab view. One for each AI state. An AI creator can then flip through and see an AI's research for each state, without viewing everything in one confusing list.

You could also then limit the number of tech levels to one per-tab. So if you already used Physics 3 for Defend - Long Term, it will still be available for Attack, but will be already "used" for Defend - Long Term.

Captain Kwok July 26th, 2006 04:25 PM

Re: AI Research Builder
 
By adding tabs and controls for different states you start to eliminate most of the efficiency for the program. One of the main goals when I described what I wanted to Fyron was that I would have a list of all the tech areas that when I added to the research queue, they would no longer be in the list. This way you know at a glance which techs have been added and which ones remain.

Fyron July 26th, 2006 05:15 PM

Re: AI Research Builder
 
Tabs for each state preclude the ability to put the tech areas at arbitrary locations in the file, as well as arbitrary combinations of states. Entries for states do not have to be grouped, and it might be a good idea for the AI modder to mix them up in some cases.

The only way I can see managing complex states working is by changing the AI research listbox into a data grid that has a column for state. Editing it could be a matter of a popup window that has checkboxes for each state (maybe with a button to store the current selection as the default for new states). Of course, then I would be inclined to add in min percent column, and we lose the overall simplicity of the program.

I think that few people make use of AI states for research anyways, other than a couple for not-connected. From the handful of TDM AIs I looked over, they all appear to use the same set of states for most of the entries.

One thing that you could do is use the program to make two separate files, one for normal and one for not-connected. A quick find/replace in the not-connected one and a merging will do the job better than trying to manage all of the state combinations in the program, I think. I could add a checkbox to explicitly set the states to "Not Connected" upon generation, even. Of course, this doesn't really help with loading existing files. Hmm... maybe just two sets, "Not Connected" and "Everything Else". TDM tends to dump the "Not Connected" at the end of the file, not using it in the other tech area states. This seem like a good compromise?

Rollo July 26th, 2006 07:05 PM

Re: AI Research Builder
 
Quote:

Imperator Fyron said:... maybe just two sets, "Not Connected" and "Everything Else". TDM tends to dump the "Not Connected" at the end of the file, not using it in the other tech area states. This seem like a good compromise?

yes

Fyron July 27th, 2006 06:09 PM

Re: AI Research Builder
 
I decided not to go with tabs, due to issues of implementation and efficiency. Instead, I added a drop box for selecting state option. By default, the program behaves much the same as it did in 0.08; it adds everything to the general state list. When you select the Not Connected state option, the listboxes will be changed to have data appropriate to that state.

You can load AI files that have Not Connected entries. How it works is thus:

If the state for the entry is "Not Connected", it will be added to the Not Connected list. If it is anything else, it will be added to the Others list. The program does not seek to maintain any other state combinations that may be present in a file.

AI Research Builder 0.09

I'm sure there will be bugs here and there from the transition, though I did try to test everything.

Fyron July 29th, 2006 10:59 PM

Re: AI Research Builder
 
I changed the status bar help to use tooltips instead. I also moved the State dropbox.

AI Research Builder 0.10

So has anyone used the last version or two? What do you think?

gregebowman August 2nd, 2006 07:22 PM

Re: AI Research Builder
 
Where can I find this .NET runtime program you're talking about?

Fyron August 2nd, 2006 08:10 PM

Re: AI Research Builder
 
.NET 1.1 Framework

Fyron August 9th, 2006 01:12 PM

Re: AI Research Builder
 
Any complaints or suggestions from those that have used the program?

Captain Kwok August 9th, 2006 01:13 PM

Re: AI Research Builder
 
I don't have any myself. It works well for my purposes.

Urendi Maleldil August 9th, 2006 04:36 PM

Re: AI Research Builder
 
I have to finish building the tech tree for my new mod. Then I'll gat a chance to actually put the AI research builder to work.


All times are GMT -4. The time now is 12:05 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.