Alpha Test Game 4

Turn 9: movement phase.

We've got tailing going on, and Quail didn't bite it!! The HS moved the way it was supposed to...should it still be on the board at this point, though? I mean, it missed and it's only good for one turn, isn't it?

Can't see anything else that seems wrong at the moment. I did get some error messages when I first went to the site; I think I was just lucky enough to be accessing the site while it was updating for the new turn. It was gone when I did a reload. Copied them down anyway...here it is:

Warning: get_class() called without object from outside a class in /home/agespast/www/www/avacar/phase5/indicator_funcs.php on line 115
Warning: get_class() called without object from outside a class in /home/agespast/www/www/avacar/phase5/indicator_funcs.php on line 127
Warning: get_class() called without object from outside a class in /home/agespast/www/www/avacar/phase5/indicator_funcs.php on line 127
Warning: get_class() called without object from outside a class in /home/agespast/www/www/avacar/phase5/function.php on line 66
 
Wow, that was quite something! I tailed Quail in turn 8 EP, and now I'm getting the tailing predictions in turn 9 MP! Thanks for the info, but I'm pretty sure I KNOW where the Quail I was tailing has gone by now. ;)
What's more, the tailing message was "looks to be gearing up to slide right." Um...? So either this is Quail's NEXT move, or that tailing prediction was pretty much messed up. :) Also, it would be nice if the tailing prediction would throw a name of the ship I'm tailing.
Bravo 1 is (or was) highlighted in yellow, by the way, as opposed to my other (red) ships.
 
Turn 9: Combat Phase.

......this could get interesting.

Game just gave me the option to fire on on my own guy. That's a first. Grimreaper on Dark Archon; that's the specific match I'm talking about.
 
Turn 9: movement phase.

Warning: get_class() called without object from outside a class in /home/agespast/www/www/avacar/phase5/indicator_funcs.php on line 115
Warning: get_class() called without object from outside a class in /home/agespast/www/www/avacar/phase5/indicator_funcs.php on line 127
Warning: get_class() called without object from outside a class in /home/agespast/www/www/avacar/phase5/indicator_funcs.php on line 127
Warning: get_class() called without object from outside a class in /home/agespast/www/www/avacar/phase5/function.php on line 66
Drat, that does mean that a turn calculation went bad, possibly related to the tailing issues.

Did anyone make sure that the afterburner turns are working correct now? And looking at the code, I'm not sure what could have gone wrong.
Wow, that was quite something! I tailed Quail in turn 8 EP, and now I'm getting the tailing predictions in turn 9 MP! Thanks for the info, but I'm pretty sure I KNOW where the Quail I was tailing has gone by now. ;)
What's more, the tailing message was "looks to be gearing up to slide right." Um...? So either this is Quail's NEXT move, or that tailing prediction was pretty much messed up. :) Also, it would be nice if the tailing prediction would throw a name of the ship I'm tailing.
Bravo 1 is (or was) highlighted in yellow, by the way, as opposed to my other (red) ships.
Keep tailing guys; we need to figure out what is causing tailing to work/not work consistently. At least the yellow told you to expect tailing, but I suspect something weird happened if it didn't give you a target name. I don't have enough info to track the bug down though, so keep tailing and see what happens. (Tail your own ship if you have to). I can't read tailing predictions, sadly so I can't replicate without either playing as a ship, or having you guys report.

Turn 9: Combat Phase.

......this could get interesting.

Game just gave me the option to fire on on my own guy. That's a first. Grimreaper on Dark Archon; that's the specific match I'm talking about.
Yeah, if you hadn't figured it out yet (the others probably remember this for a while back) I have not coded anything like a team affiliation yet. You can tail/attack/etc your own ships or people on your team in a team game. For now that hasn't been a priority since you guys can tell teams apart and make the right choice!
 
Still need to check...Bravo1 hit his AB this turn, but there was only a single turn done during the move. He wound up where he was supposed to, so that part's working at least. Nobody turned two or more on the afterburner this turn. We'll likely get some missile fire going on in the combat phase, though, so there may still be a chance to check it again if/when folks go evasive.
 
Yeah, I bet we'll see some evasive afterburner action this EP... :p
Now that missiles have info tabs (yay!), I'm wondering why Sierra 2's FF missile is targeting Zeta 2 instead of Wandering Soul. The latter is the nearest enemy, and it is well within the FF's fire arc.
Also, Sierra 1's FF missile is targeted at Grimreaper, instead of either Dark Archon or Zeta 1.
 
Turn 9, end phase:

There's also no targeting data on the FF that Bravo1 launched; obvious to us that it should be Quail5. Y'all might want to check to see what firing arcs FF missiles are using at the moment; the arcs so far are consistent with Torpedo fire.

The FF targeting at Grimreaper can at least be explained...Sierra1 fired its guns at Grimreaper this turn. Isn't there something in the rules about how you can only fire at one target during the course of a turn?

Doesn't explain what happened to Sierra2. I'm sure that FF was meant to be a parting shot at Wandering Soul. I for one had hoped to beat the odds on the Particle Cannon fire doing him in this turn...oh well. I thought that Sierra2 was out of afterburner fuel by now...maybe I miscounted somewhere - I did. Damn.

Based on the rules, if Bravo1's missile is NOT locked onto Quail5, Dark Archon might about be fixing to have a bad day...

I suppose that missile could've locked on Grim Reaper because Dark Archon and Zeta1 are equally valid targets at the same range and the system's confused. I am noting that while the game is saying Grimreaper is targeted by the FF, it's Dark Archon that's been given the evasion option. Once again, though, it could be being asked to evade because of Bravo1's FF not locking onto Quail5.

I think y'all have got some bugs to work out with FF missiles...

Ain't thrilled about what's going to happen this end phase. If Archon evades and the missile is actually locked on Grimreaper, Grimreaper dies and both Sierra1 and Zeta1 will jump him on the next movement phase. If Archon doesn't evade and the missile is actually locked on him, and Bravo1's FF locks on him, he won't die but I'll have two very heavily damaged fighters to work with...

I suppose there is one more option. And it probably needs testing to.
 
Hmm......I can click the options button on Dark Archon's pop-up, but no actual options show up other than "Report Orders to Fleet Command"; it doesn't give me the option to "Take Emergency Action", though by my reckoning he's got all three missile evasion options (drop chaff, shoot it down, or hit the burner) available. What gives here, guys?
 
Heh...yeah, FF missiles are 'fun'. Coding them was more or less my first attempt at really simple AI, which isn't an easy topic. Keep in mind an FF will go after anyone with hull damage.

So I'm looking over the FF code right now, and let me explain what I see it is trying to do, then you guys can help me try to come up with how to fix it.

There are 2 parts to all weapon code, first the determination of *if* you can fire a missile. This determination is done when you guys click the 'orders' button, and it populates the target list for that missile. The 2nd part is done when a turn is processed (all orders are in) and a missile tries to go fly.

Here is the logic on an FF missile:

  1. Scan all ships on the map. Calculate range and bearing to each ship.
  2. If the ship is you, reject as target.
  3. If the ship is 0 range from you, reject as target.
  4. If the ship isn't a ship (aka asteroid/missile/etc.) reject as target.
  5. If the range is greater than 12, reject as target
  6. If the bearing is greater than 120 degrees or less than 240 degrees, reject as target.
  7. Survived all those checks? This ship counts as a target
  8. Add ship to the missile's potential target list
  9. Return to step 2-8 for remaining ships on the map.
So that's how the list of who you could fire an FF is made. It should be noted, however, that when a target is found, no actual 'list' is generated, so you can't actually pick a target for an FF, but know that it has to have found a valid one during the time you clicked the 'orders' window for it to appear at all.

Now we'll look at what happens when the turn is processed. This is pretty weird/complicated.
So the logic when you fire a missile (any missile, but I'm going to step down the FF tree specifically)
  1. Trigger weapon firing routine
  2. Determine it is a missile
  3. Call weapon->firemissile($target)
  4. Determine missile type (FF)
  5. Throw away garbage $target value (since FF's won't have valid targetting information stored as part of the order since the orders window presents no choices)
  6. Reset any potentially on-going locks for other missile types (IR/Torp) to -1, meaning the lock is cancelled
  7. Create report message that $this->ship->name "fires a friend-or-foe missile."
  8. Create a new missile object, at the location of the ship, aimed the same way as the ship, of the same race as the ship, ...oh weird, and default targetting at $target->id. This would mean that when I said 'thorw away garbage target value) I guess I meant ignore it. I have no idea what value would be put there; so there's potentially a small amount of either incorrect or garbage data being put into the FF that will be what determines the EP popup's "Targetting:" text for FFs. Honestly, if the ship had other missile possibilities, it might be picking whatever another missile's drop down was most recently at when the order was submitted... I really don't know! I'll need to look at the submit_combat_orders function carefully to determine that, and at least remove the misleading FF targetting info. Or post and correct me above that I'm wrong that FF's don't let you pick their target. If they do, then it would be that target listed, presumably?
  9. Remove 1 missile from the firing ship's inventory
Okay, as of this point the missile now has independent status, and appears on the map during the end turn phase. Looks like you can't trust the targetting info at all at this stage.

I'm going to skip 1 aspect for now, which is that when the end-phase engine is initiated and it is determined if you guys need to give orders, the thing makes a quick guess at if an FF is coming after you, and this would offer you evasive action if it thinks it is. I *believe* this is just pre-running the same code that the missile itself runs when it flies, so I'm just going to go over that code. I suppose I could fix the targetting issue by re-setting the missile's target at that stage to be going after the person we think it will fly after... actually looking at that code, it looks like after determining if an FF is coming at you, the FF actually does pick its preliminary target and finally set its ->targetid field. So going into EP it would have a target picked.

Let's go over the FF->can_target() routine:
  1. Iterate through all ships in order they were generated (note this is how conflicts of multiple targetted ships is resolved; it'll always target the first it finds)
  2. If range is 0, reject
  3. If it isn't a ship, reject
  4. If the bearing to the target is between -1 and +1, and it is less than our max speed away, THAT'S OUR TARGET
  5. No? Okay if bearing is less than 90, turn right, if bearing is greater than 270, turn left
  6. Now do a for loop, iterating from speed of 1 to a speed of max speed, trying to fly and turn the chosen direction (left or right) 1 and see if there is a combination of speed + a single turn that can make it to THAT target. if there is, THAT IS OUR TARGET
  7. Did we not hit the target with a single left/right turn? Now try doing it again with a 2-turn. (Still trying to go left or right as chosen before)
  8. Enter 2-turn search mode: do a for loop that tries to make all possible 2-angle turns and checks *every square* along the path to see if we've hit the target. Note that because I assumed a 2-angle turn would mean the range was actually shorter, this loop iterates from a distance of the lower of max_speed or $range_to_target*2. Hit it, then THAT'S OUR TARGET.
  9. Repeat for all other ships if no target was found.
If we can't find a target that way, we consider that we have no target.

Hmm, I have to go, I'll have to address the chase code later. If you see a flaw or can make a recommendation, that would be great. I wrote this 6 months ago, really late at night; just by typing it out like this, I think I see some spots where I can clean it up.
 
Hmm......I can click the options button on Dark Archon's pop-up, but no actual options show up other than "Report Orders to Fleet Command"; it doesn't give me the option to "Take Emergency Action", though by my reckoning he's got all three missile evasion options (drop chaff, shoot it down, or hit the burner) available. What gives here, guys?
Gotta go, I'll post later; don't submit orders for now, and then I can analyze why that came up a bit better by messing with a live situation instead of trying to do it forensically. This could be that same situation that Ironduke had a turn ago that I wanted you to look into.
 
Gotta go, I'll post later; don't submit orders for now, and then I can analyze why that came up a bit better by messing with a live situation instead of trying to do it forensically. This could be that same situation that Ironduke had a turn ago that I wanted you to look into.

OK, I'll hold off on submitting orders for the time being. Meantime, I probably oughta get to checking like I said I would...it's been a busy last couple of days.

#6 on your FF missile logic looks fishy at a glance...
 
So right now, it's my opinion that afterburners are not viable for small ships. Because each time we have to consider using them it will always send us off the map.
 
So right now, it's my opinion that afterburners are not viable for small ships. Because each time we have to consider using them it will always send us off the map.

I kind of agree with this, though in our case it's because the map is as small as it is...when the grid is only 23 hexes long and your ship's AB speed is 14, you tend to run out of room really fast.

.........you've got a real problem there, QuailPilot.
 
We can see how much of a concern that is in the next game. I'll make it 100 squares to a side and see if you guys prefer managing that instead. Hope you like scrolling!
 
Well I had just finished a full breakdown for you on FF missiles, and hit 'close' instead of 'post' (I know, the buttons are on opposite sides of the screen!). Anyway, here it is again, justifying each FF missile. As far as I can tell, they are following the correct logic in all cases!

Turn 9, end phase:

There's also no targeting data on the FF that Bravo1 launched; obvious to us that it should be Quail5. Y'all might want to check to see what firing arcs FF missiles are using at the moment; the arcs so far are consistent with Torpedo fire.
The FF can't reach Quail 5. First off, it should be clear that the FF needs to make a turn 2 left movement attempt to reach Quail 5. A 1 turn left movement clearly won't make it.

As per the targetting search algorithm above, for turn 2 left movement attempts, we start at range*2, meaning the first flight attempt would be a speed 4: turn 2 left movement. That would be forward 2 squares, left 2 (which is a -1 movement since missiles are not considered to be afterburning Ironduke: chime in if you disagree on that point) and therefore has 1 movement left --> Can't reach Quail 5.
Next attempt in the for loop would be a speed 5 turn 2 left movement. In this case that would be forward 3 squares, left 2, forward 1 square: still can't get there! In fact, if we did this all the way to max speed, we'd determine that the missile simply doesn't have the turn radius to make it to Quail 5, so it isn't targetted.

The FF targeting at Grimreaper can at least be explained...Sierra1 fired its guns at Grimreaper this turn. Isn't there something in the rules about how you can only fire at one target during the course of a turn?
We had this debate much earlier in the WCTOO dev thread. Ultimately I think it was decided you could fire guns at 1 target, but fire a missile at another. It kind of makes sense for the lock-on missiles (you could be free-firing your guns) and not so much for the dumb-fires, but for coding reasons, we have to keep missiles consistent... FF's are special anyway, since you effectively drop them and hope they go after who you wanted.
The real issue here is that Dark Arkon is an undamaged Confed. Keep in mind 'teams' are not in here yet, so the FF will identify any fellow un-damaged confed as a friend, and therefore invalid target. Grimreaper is an evil Kilrathi, so it went for that one.

Doesn't explain what happened to Sierra2. I'm sure that FF was meant to be a parting shot at Wandering Soul. I for one had hoped to beat the odds on the Particle Cannon fire doing him in this turn...oh well. I thought that Sierra2 was out of afterburner fuel by now...maybe I miscounted somewhere - I did. Damn.
Well Sierra 2's FF simply can't make it around to Wandering Soul (see turn radius example above), but fortunately Zeta 2's IFF is damaged, and so the missile locked onto that un-identified target.

Based on the rules, if Bravo1's missile is NOT locked onto Quail5, Dark Archon might about be fixing to have a bad day...
Nope, Dark Arkon's IFF is fine right now, and same for Sierra 1, so it is more likely that Grimreaper will have a 2nd FF coming in... in a couple of turns. At the moment, the missile doesn't have a turn 1 movement path that is valid to hit Grimreaper, so it'll fly straight and hope.

So as far as I can tell, all missiles are handling more or less correctly. I guess I haven't taught them how to bank; Bravo 1's FF probably could have targeted and hit Grimreaper this turn if missiles could bank. Ironduke: do you want missiles to be able to bank, if they're self-guided?

I think y'all have got some bugs to work out with FF missiles...
Conclusion: all FF's operated as predictable by the algorithm. Whether or not this is correct is now a rules discussion, not a coding bug. Yay!
 
Hmm......I can click the options button on Dark Archon's pop-up, but no actual options show up other than "Report Orders to Fleet Command"; it doesn't give me the option to "Take Emergency Action", though by my reckoning he's got all three missile evasion options (drop chaff, shoot it down, or hit the burner) available. What gives here, guys?

Okay so Dark Arkon has no incoming missiles, and therefore no need to evade. He also has no valid tail attempts. I'm not sure why the game decided you needed to stick around and give an order... but I did find one relatively important typo in the 'do you need to take a turn' detection code. I don't see why/how it would have caused you to stick around, but perhaps this will fix it. This particular bug fix will only affect the 'orders are needed' decision from combat to endphase.

All Test Pilots: Please now resume submitting orders.
 
All Test Pilots: Please now resume submitting orders.
"Okey dokey, Dr. Jones."

BTW, I've started my search in earnest. So far, I've gone through the thread for Alpha Game 3; getting ready to go back through this thread. Saving the big one for last. I'm making sure to copy down the URL for the specific post involved in each case. I do need to go back through the ones I've seen to make sure they're referring to this particular problem; I'm pretty sure our bug happened three times in Game 3. I'll let you know when I can get a final report ready to go.
 
#6 on your FF missile logic looks fishy at a glance...
#6: If the bearing is greater than 120 degrees or less than 240 degrees, reject as target.

......um, not that it may matter much for the game right this second, but shouldn't that be "greater than 120 degrees and less than 240 degrees"? I mean, my bearing could be 300 degrees...that would be greater than 120 degrees. Or it could be 90 degrees...that'd be less than 240 degrees. Just saying.
 
Yeah, we've had that before. It thinks you can do something, and then discovers you can't. I haven't tracked it down. Capi, since you're our bug-finding expert currently, feel like going back through the logs of this game and the other alpha test games to find references to this particular occurrence? I probably posted a theory at the time and asked people to bug/remind me later as usual, and it got lost over the 6 month gap where I was too busy to develop.

Alright; finished my search. The following posts either reference the occurrence directly or sound similar enough to be of note:

From the Main Development thread:
https://www.wcnews.com/chatzone/thr...ded-version-of-wcto.24521/page-14#post-358912 -- from 9/27/2010
https://www.wcnews.com/chatzone/thr...ded-version-of-wcto.24521/page-14#post-358913 -- from 9/27/2010, the reply to the first post.
https://www.wcnews.com/chatzone/thr...ded-version-of-wcto.24521/page-17#post-358975 -- from 10/10/10 (sound similar, at least)

From the Alpha Game 3 thread:
https://www.wcnews.com/chatzone/threads/alpha-test-game-3.24861/page-4#post-363395 -- 11/15/10
https://www.wcnews.com/chatzone/threads/alpha-test-game-3.24861/page-6#post-363438 -- 12/10/10
https://www.wcnews.com/chatzone/threads/alpha-test-game-3.24861/page-7#post-363453 -- 1/11/11

From this thread:
https://www.wcnews.com/chatzone/threads/alpha-test-game-4.25038/page-6#post-370126 -- 9/20/11 (Tuesday)
https://www.wcnews.com/chatzone/threads/alpha-test-game-4.25038/page-6#post-370138 -- 9/20/11 (Tuesday)
https://www.wcnews.com/chatzone/threads/alpha-test-game-4.25038/page-7#post-370216 -- 9/22/11 (Today)
 
Last edited by a moderator:
Okay...I'm holding up the works at this point.

I think I see why the game might've thought Archon needed to do something. Going back to your targeting algorithm for FF missiles:

#4: If the bearing to the target is between -1 and +1, and it is less than our max speed away, THAT'S OUR TARGET

Am I right in thinking that means one hex to the left or to the right of the missile's current heading? If so, that explains all the FF missiles launched this turn; they were all either along the same heading or one hex to the right/left of that heading. Probably was programmed that way so that the missiles could bank...and if their movement is like everything else in the game, I don't see why they couldn't be able to bank. Just my opinion on the matter. Once again, though, that's more of a rules issue than anything else.

An FF missile has a speed of 12. Dark Archon is along a straight line from the missile's current position, 11 hexes away. Therefore, he could be a valid target for Bravo1's FF missile; as you mentioned earlier, though, since Archon is a confee (and teams are not implemented), the missile won't target him (yet).

I dunno. Might be someplace to localize a search for what's going on with this bug. Meantime, I'm going to confirm Archon not doing anything.

If he does takes a missile hit, I might be some kinda pissed...
 
Back
Top