berto -> RE: Sneak Peeks, Coming Attractions, Works-In-Progress (8/28/2019 8:42:25 PM)
|
Some more recent (private) Dev Team Forum posts. quote:
ORIGINAL: berto So, I am working to SAI the VN_641230_Binh_Gia scenario. With the VC SAI finished, and parts of the ARVN SAI finished, next up is implementing the ARVN helo reinforcements SAI. In this scenario, the ARVN helo reinforcements begin appearing on Turn 6. To get to my current area of SAI focus, I have to sit through watching ... and watching ... and watching [>:] the auto-test replay of Turns 1 through 5, which I have endured many, many times already. Before I get to the good stuff, let me explain my SAI development methodology. First, I will develop one side or the other's SAI, with the opposition side's units on hold() in the meantime. I script this, I script that. Along the way, I auto-test the game play, for example: rober@Rob10rto /cygdrive/c/Games/Matrix Games/Vietnam/vietnam $ ./vnengine.exe -W -7 -T -R -L3 VN_641230_Binh_Gia.scn I observe shortcomings, see areas of improvement, and all too often, I encounter bugs. I apply the improvements, fix the bugs, and redo the auto-tests. Wash, rinse, and repeat ... Eventually, I am satisfied that the one side's SAI is WAD, or good enough. Then: Second, I develop the other side's SAI in the same manner as above (and with the earlier side's units also all on hold()). Satisfied with each side's SAI when run in isolation, one side at a time only, then: Third, I run both side's SAI in tandem. Of course, there will still be shortcomings, better ideas, and bugs. More improvements and bug fixes. More auto-retests. Wash, rinse, and repeat ... That's a lot of auto-test replays to sit through! [X(] Lots of watching and watching and watching the same thing over and over and over again, patiently waiting until the turn or the action point of current interest comes around. This is the chief reason why the scripting process is so time consuming: All of those minutes of auto-test replay watching add up to hours and hours of dead time. Stupefyingly boring dead time. Available to me, but not to you [:'(], I have a mechanism to stop/start the AI action. I can $ touch "$VN"/pass to create a file "pass" (an empty file) in the CSVN home folder, else $ rm "$VN"/pass to r(e)m(ove) that file. (Doing this in a Cygwin terminal.) I have coded things such that when I run the game in Debug mode (unavailable to you guys [:'(]), I can halt the AI auto-test replay at the next phase turnaround by means of an 'rm'; and resume the AI auto-test replay by means of a 'touch', and also an AI > Activate AI toggle. (I have many other means of testing and debugging at my disposal, some of them available to you also, most importantly use of the DEBUG switch (set in user.lua), the CSEE log() function, etc.) Great, but not quite so great: touch'ing or rm'ing the pass file still requires me to pay somewhat close attention, since it is a manual action. I can let my attention wander; I can multi-task and do other things while waiting for the auto-test replay to get to the stop point; but I still need to 'touch' or 'rm' the file at the appropriate time. I can't automate this. Or I couldn't, until ... quote:
ORIGINAL: berto Available in the next release, the new CSEE functions: pass() [effectively only for my use] nopass() [ditto] aistop(msg) [for everybody to use] By means of this function on_arty_attack (hc, trackid, pid, name, side, nation, oid, orgname, points, strength, HQ, Leader) -- DO NOT REMOVE aistop("in on_arty_attack(), hc " .. hc) end I can get the SAI automatically to stop, and display this: [image]http://pikt.org/matrix/cs/graphics/SAI_aistop1.jpg[/image] Automatically stop, and display the diagnostic message, without my having to pay attention or take manual action until then. The msg is optional. You can also call the aistop() function without any inputs, as in function on_next_phase (turn, side) -- DO NOT REMOVE ... if turn == 3 and side = SIDE_A then --nopass() aistop() end end On Turn 3, at the end of the Side A phase, one might see this: [image]http://pikt.org/matrix/cs/graphics/SAI_aistop2.jpg[/image] (This is effectively much the same as my using nopass().) Note that one might also add a diagnostic message here, as in: if turn == 3 and side = SIDE_A then aistop("in on_next_phase(), Turn " .. turn .. ", Side " .. side) end This is way, way cool. The CSEE now has debugging breakpoints! Together with the aistop(msg) diagnostics, perhaps supplemented by additional standard CSEE log() calls; by using the CSEE traceon() & traceoff() calls, for code tracing; and by other means -- the Lua CSEE offers a rich array of debugging tools and techniques. And just as important: Automated ways of applying those tools and techniques, freeing us from much of the development/testing/debugging tedium. This is a huge advance, it will save us from hours and hours of boring auto-test replay watching. Let the CSEE automatedly monitor its progress and stop by itself, while we do other things. Geek joy! [sm=cool0013.gif] If it's not clear: You, the player, need not concern yourself with any of this. This is all just background stuff of concern to us, the game developers, and perhaps also you as a modder. The CSEE gives us lots of toys to play with. Play the actual game. Play the modding meta game. One way or the other, have fun!
|
|
|
|