Need help to get the AI Trainer to work

Mogh
Warrior Recruit
Warrior Recruit
 
Posts: 5
Joined: 30th Aug 2016

Need help to get the AI Trainer to work

Postby Mogh » Thu Sep 01, 2016 5:10 pm

Hello fellow Star Trek: Klingon Academy enthusiasts

I need your help to understand how to make the AI Trainer work correctly as it seems not to be recording .mem files.

I made myself the DVD version of the game as instructed using the original CD’s from the following instructions http://gaming.trekcore.com/klingonacade ... howto.html . After, everything seems to be as it should be from the description of the instructions. I installed the game from the DVD. After the initial game installation, I was then asked if I wanted to install the following which I did… Mission Scripting Package, AI Trainer Package and Extract DATA.DAT File.

I launched the game by using the Klingon Academy AI Trainer, which is linked to the “KAAI.exe” file, in the Start Menu of Windows. I then went to the Simulator to launch the AI Training Script but did not see it as described from this link http://dhost.info/phoenix/texture/ai_tut.htm . Following further instructions from this link, I proceeded to input the following text “kaaix.int:AI Trainer Script”, which I presumed I can put in the first line, in the first line of the missions.txt file located at “Klingon Academy\SCRIPTS” on my harddrive where the game is placed. All other factors were in place as described from the website link mentioned above except that instead of the file “ka_ai_trainer.exe” being in my KA folder, the file “KAAI.exe” was there to launch the AI Trainer. Now when I launch the AI Trainer using the same technique as I did previously, I can see in the Simulator the option “AI Trainer Script” which then I launched. The AI Trainer seems to be functioning, the ships are fighting and the “Learn” in the left panel says it is on for all 10 spots as described in the mentioned website link. There seems nothing else I should need to do. I ran the battles for over 2 hours. There is no mention of how to stop the simulator, so I just exited normally by using ESC and choosing in the game to exit all the way to my desktop. I looked for the saved .mem files that should have been saved under the ships folder for the ships that were used as described in the “ai_que.txt” file but there were no newly created files or even updated .mem files. I can tell by the Date Modified and Date Created stamp for files by using Windows Explorer. As mentioned in the website link, this is where the .mem files should be. I then did a broad search for all .mem files in the KA folder and again on my entire harddrive with no success. I have set Windows Explorer to view all extensions for known file types and to show hidden files, folders and drives with no success. I tried the same procedure by running the AI Trainer all night with no success. I then tried a different tactic. I decided to go into the “ai_que.txt” file to change the ships as described by the website link. I put #NULL# for every Good and Evil slot already there except for the first slot for both Good and Evil. For those, I put for Good #FCL USS Reliant# and for Evil #FEC USS Grissom# . These two ships were part of the 10 original ships in the “ai_que.txt” file. The file did not let me save the changes as it said it was write protected, so I saved it in another folder and then moved it and replaced the original one by overwriting it giving administration permission. When I ran the AI Trainer, I noticed that I got Bird of Prey vs Federation. The original “ai_que.txt” file had the Bird of Pray in the 10 Good slots. Now I am wondering where I went wrong. I am running windows 7 64x with the latest windows updates.

So the question here is, what am I doing wrong and how can I get it to work where I can empirically see that the .mem files are being written and the correct ships are in fact being trained? Can anyone else follow the same steps I took and see if you are having the same issue? I really want to train these ships so I can get a worthwhile battle out of them. I get bored of games because AI’s are predictable and defeatable but to train them is an amazing concept! I love Star Trek and this is the game I own and want to play so please help.

Mogh
Warrior Recruit
Warrior Recruit
 
Posts: 5
Joined: 30th Aug 2016

Re: Need help to get the AI Trainer to work

Postby Mogh » Fri Sep 02, 2016 7:23 pm

Good news my fellow Klingons, with sweat, effort and a bit of crying... I found the answer to my dilemma. You have to run the AI Trainer in administrative mode by right clicking on the launcher and choose "run as administrator" and then it works! The ships I changed in the “ai_que.txt” were recognized and the AI Trainer started to create .mem files. Live long and prosper... if you can.

teeth_03
Order of Kahless
Order of Kahless
 
Posts: 3060
Joined: 2nd Jul 2003
Location: Somewhere in the Matrix

Re: Need help to get the AI Trainer to work

Postby teeth_03 » Sat Sep 03, 2016 12:11 pm

Windows 8 and 10 doesn't give full access to anything under Program Files, so when doing stuff like this, you need to either give Everyone permission to the specific program folder under Program Files, or run things as Admin.

Mogh
Warrior Recruit
Warrior Recruit
 
Posts: 5
Joined: 30th Aug 2016

Re: Need help to get the AI Trainer to work

Postby Mogh » Sun Sep 04, 2016 10:32 pm

Thank you for responding teeth_03

I am testing the AI Trainer to the best of my ability and I need clarification on some things because it seems that l still cannot be sure if it is working. I have carefully read through the websites that I mentioned in my first post but I don't feel like it explained enough. I have also read through every thread on this site concerning the AI Trainer.

1. Within the file “AI_Que.txt” on the first line it says “PlaceThisTextOnTheFirstLineOfThisFileToNotUseBatchAITraining”. What does this mean? l was not able to tell of any difference during AI Training observation. I filled all 20 slots in the “AI_Que.txt”. I trained with that sentence in both the first line and also without it leaving the first line in the file empty. The meaning of what batch AI training I think means to me was happening with or without it. Visually, the same type of training was happening either way. I need a better behind the scenes explanation.

2. After the training battles have started, file “AI_Que.txt” starts to get written into it a limited amount of times at the end of the file after the “>> EOF <<” with the same sentence as the first line’s sentence regardless if that sentence is in the first line or not. Sometimes it seems it is written once and sometimes it seems to be written five times and is placed underneath each other.

3. While the AI Training was training with or without the first line intact mentioned in 1., the 10 fights that were going on in the AI Trainer were not consistent. There would always be battles that would not refresh meaning that one ship would wait for the enemy to respawn but would never. This would lead to a number of fights that would wait forever while during others would consistently respawn. This happens even if the numbers of battles in the “AI_Que.txt” are reduced including if there were only two battles and the rest of the slots in the file have #NULL# in them as described on the website.

4. While the AI Trainer is training, the first battle slot always accumulates what seems like the fallen ships from the other battle slots. The ships appearing and accumulating in the first slot are lined up, static and non-functional. After many hours, a lot can be seen. The ships designated to fight in this slot fight each other and try to fight the non-functional static ships. I suspect that these accumulating ships are the reason why the AI Trainer is slowing down to a stutter after many hours of it running. It seems to me like this is an error to accumulate the ships like this but I hope someone can tell me.

5. The correct .mem files are generated as described in the website in my first posting. These .mem files Date Modified stamp are showing that they are consistently being updated while the AI Trainer is being run and the correct ships for these .mem files are being trained. The files sizes are not changing so I am questioning if only a certain amount of data is being written and anything new overwrites the previous data while running the training for many many hours. I would obviously want all data from all battles over let us say 20 hours of training to be recorded and permanently stored. Why is the file size staying consistently the same? Is this normal to maintain the file size while permanent storage of the data is always taking place?

6. Will the .mem files for the same ships (no changes are made as described in the previously mentioned website) being trained accumulate and remain stored after starting, stopping and then restarting the training? For example, If I run the AI Trainer and train only at night then start again a new training battle with the same configuration the next night, will the .mem files permanently accumulate the data from every nightly training or reset (delete previously accumulated data to accumulate the next night’s training)?


As it is now, I cannot know if anything is actually working as it should be. The biggest concern I have is how the .mem files are not growing in size! I do not want to train for days or even weeks monopolizing my PC time by either running my PC 24 hours or to have only nightly training to find out that I am not correctly accumulating the data experiences of the battles. Is anything that I have described out of place for the AI Trainer on my PC?

Mogh
Warrior Recruit
Warrior Recruit
 
Posts: 5
Joined: 30th Aug 2016

Re: Need help to get the AI Trainer to work

Postby Mogh » Tue Sep 06, 2016 2:25 pm

One more thing. Let us say everything I asked in my previous post is working as it should be for training in the AI Trainer, how do I take advantage of it? Do I have to play quick battles only through launching the ka.exe via the AI Trainer launcher? Can I just launch directly the ka.exe without going through the AI Trainer launcher? Will it work if I create a multiplayer game and play a solo game using the same ships that were trained in the AI Trainer? In the most basic answer I am hoping someone will answer is to know at least one definitive way for the trained .mem files to be used by the AI against me.

Mogh
Warrior Recruit
Warrior Recruit
 
Posts: 5
Joined: 30th Aug 2016

Re: Need help to get the AI Trainer to work

Postby Mogh » Sun Sep 18, 2016 2:22 am

I am surprised that the AI Trainer is not much more popular to use by the lack of response and information I can find from this forum and the internet. I would think that it is a critical need for all long term players. Logic alone tells me that after playing a game for years that the game gets old, as all games do, and people stop playing it. What I mean by old is to reference to the game not providing a challenge anymore or to new content that keeps ones attention. Eventually, the human player can predict movements and the battles become less unique and surprising. One of the biggest solutions would be to have human opponents. Of course, that is not practical for a non-online 24 hour game with lots of human players. I am surprised there are not people who run, if it works this way as it is part of my unanswered questions, the AI Trainer every night for weeks, months and why not even years to keep the AI smart, creative and by golly a continued worthy opponent. This is Star Trek my friends, Klingon Academy is as good as it can get for this type of play. To think, to command and master a ship or ships and continue to have creative diversified battles against the AI forever is to say that you are watching and living a new Star Trek battle on TV or YouTube every day for the rest of your life! To me, it is like getting my Star Trek drug fix whenever I need it. I am a Star Trek fan for over 30 years and I can say I do want my Star Trek fix every once in a while.

Darth Raven
Order of Kahless
Order of Kahless
 
Posts: 16664
Joined: 11th Sep 2001
Location: Hawai'i

Re: Need help to get the AI Trainer to work

Postby Darth Raven » Wed Sep 21, 2016 7:49 am

Actually, the AI Trainer isn't needed to train stock ships, as the developers spent about 200 hours training them all before release lol. The program is really only useful for training mod ships.

Once you finish training your ship, the .mem file will remain in that ship's directory. You don't need to do anything further to take advantage of it. Once you load any game using that ship, the game will automagically load the .mem file and you'll benefit from the training. But again, the stock ships already received a ton of training, and doing more with them won't really benefit you in any noticeable manner. Now if you go and download some mod ships, you probably would do best to run them through the trainer until they've fought against each ship about 100 or so times. You'll notice the mod ship will do much better after you're done.

One thing you might want to keep in mind is the training program really wasn't designed for a real release. There are errors with it... sometimes it works great, sometimes it doesn't. That's why I say to run the ships through about 100 battles... They should learn something by then. Nowadays, that really doesn't take very long at all.

Good luck!
( [email="raven808" [@] gmail [.] com] | My Klingon Academy Mods )

Image


Return to Klingon Academy Modding

cron