Machine Learning Recruiter

Discussion of all aspects of the game engine, including development of new and existing features.

Moderator: Forum Moderators

Quitch
Posts: 69
Joined: January 10th, 2006, 2:32 pm

Re: Machine Learning Recruiter

Post by Quitch »

I'm following those instructions, but as I said, I've downloaded the patch, downloaded the source and now it's telling me to apply the patch to the source using the following command:

patch -p1 -i [path to patch file]

However I have no idea what patch(.exe?) is. I have no such file, nor does it appear to be part of the patch itself nor the Wesnoth source. I'm not referring to the patch file, rather the command "patch".
SeattleDad
Posts: 74
Joined: March 4th, 2012, 6:09 pm

Re: Machine Learning Recruiter

Post by SeattleDad »

Hi Quitch,

Thanks for looking at this. I'd like to help out, but unfortunately I'm on a Mac and it sounds like your on Windows. Can anybody help out with the best way to apply a patch on Windows?

SD
JaMiT
Inactive Developer
Posts: 511
Joined: January 22nd, 2012, 12:38 am

Re: Machine Learning Recruiter

Post by JaMiT »

Quitch wrote:But what's patch? I cannot find such a file.
It is a Unix/Linux program that updates text files (an that is typically included in any Unix/Linux installation). Your mention of ".exe" suggests you are using Windows, which would mean you need a Windows version of the utility.
Quitch
Posts: 69
Joined: January 10th, 2006, 2:32 pm

Re: Machine Learning Recruiter

Post by Quitch »

Ah, I wondered if it might be a Unix thing.

I've tracked down patch for Windows as part of GnuWin32 and so will try that.
Quitch
Posts: 69
Joined: January 10th, 2006, 2:32 pm

Re: Machine Learning Recruiter

Post by Quitch »

Okay, I refuse to be defeated...

So, I run the command using the Windows version of patch (2.5.9) under an elevated command prompt. Patch then prompts me for "File to patch". I provide it with the patch to the 1.11.1 source code folder, but it states that this is not a regular file and then terminates.

Code: Select all

C:\WINDOWS\system32>"c:\Program Files (x86)\GnuWin32\bin\patch.exe" -p1 -i c:\users\quitch\downloads\ML_Recruiter_0.4.patch
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/RELEASE_NOTES b/RELEASE_NOTES
|index c0de997..c98e1f9 100644
|--- a/RELEASE_NOTES
|+++ b/RELEASE_NOTES
--------------------------
File to patch: C:\Users\Quitch\Downloads\wesnoth-1.11.1
c:\Program Files (x86)\GnuWin32\bin\patch.exe: **** File C:\Users\Quitch\Downloads\wesnoth-1.11.1 is not a regular file -- can't patch
Help!
User avatar
Alarantalara
Art Contributor
Posts: 786
Joined: April 23rd, 2010, 8:17 pm
Location: Canada

Re: Machine Learning Recruiter

Post by Alarantalara »

Repeat the exact same command, but change the current directory to your copy of the Wesnoth source first (where you see the src, data, projectfiles, etc. directories).
It wanted to know where the RELEASE_NOTES file was when it asked for the file to patch.
Quitch
Posts: 69
Joined: January 10th, 2006, 2:32 pm

Re: Machine Learning Recruiter

Post by Quitch »

Thanks, progress has been made. Alas, victory has not been secured it now terminates and crashes during the patching process.

Code: Select all

c:\Users\Quitch\Downloads\wesnoth-1.11.1>"c:\Program Files (x86)\GnuWin32\bin\patch.exe" -p1 -i c:\users\quitch\Downloads\ML_Recruiter_0.4.patch
patching file RELEASE_NOTES
Assertion failed: hunk, file ../patch-2.5.9-src/patch.c, line 354

This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.
Don't know if this is simply Windows 8 and GnuWin32's patch not getting along though.
Quitch
Posts: 69
Joined: January 10th, 2006, 2:32 pm

Re: Machine Learning Recruiter

Post by Quitch »

I'm split this discussion off into the compiling forum

http://forums.wesnoth.org/viewtopic.php?f=5&t=38108
howwitty
Posts: 65
Joined: May 29th, 2006, 5:05 am
Location: U.S.

Re: Machine Learning Recruiter

Post by howwitty »

I too am unable to patch the AI, despite having read the thread by Quitch.
SeattleDad wrote:For anyone who wants to learn more about ML Recruiter, I've just updated the Wiki at http://wiki.wesnoth.org/Machine_Learning_Recruiter.

New items are faction vs. faction statistics for ML Recruiter 0.3, faction-by-faction unit recruitment percentages, a further breakdown of unit recruitment percentages vs. the Undead to show MLR's adaptability, and some basic documentation on the new script that lets you train your own ML Recruiter.
It would help to provide initial conditions per breakdown, most notably starting gold and income. I am currently using the experimental AI recruiters that are available via the add-on server, without a patch. I have endured some serious waiting time in the range of 10-30 seconds. In the game I am playing today (Northerners v. Knalgan) this occurs on a regular basis each turn, multiple times per turn. Since a dialog also appears requesting a screenshot, my wait is further compounded by the interruption.

Thanks for your help. This sounds like a fun concept.
Attachments
Screen shot 2013-01-18 at 6.02.40 PM.jpg
I'm tired.
mattsc
Inactive Developer
Posts: 1217
Joined: October 13th, 2010, 6:14 pm

Re: Machine Learning Recruiter

Post by mattsc »

howwitty wrote:I am currently using the experimental AI recruiters that are available via the add-on server, without a patch. I have endured some serious waiting time in the range of 10-30 seconds. In the game I am playing today (Northerners v. Knalgan) this occurs on a regular basis each turn, multiple times per turn. Since a dialog also appears requesting a screenshot, my wait is further compounded by the interruption.
Thanks for reporting. Unfortunately, Fred (the AI you're using here) is still work in progress and not at all optimized. We will get back to that soon and, hopefully, both improve the AI itself and speed it up in the process. Unfortunately, that's not going to happen over night though.
Post Reply