On Thu, Sep 01, 2011 at 11:52:32PM -0700, coffeeaddict wrote:
> On Thu, Sep 01, 2011 at 12:33:43AM +0900, John Mettraux wrote:
> >
> > <aggressive snipping by John>
> >
> > ---8<---
> > sequence do
> > flank do
> > bob :task => 'side work'
> > charly : task => 'side work, part 2'
> > end
> > alice :task => 'main work'
> > end
> > --->8---
> >
> > (forget and lose also have their own expressions).
>
> Would it not be more sane to have something that describes the main
> task before the flanking tasks, like so:
>
> sequence do
> 1st_ork_platoon :task => "attack gates through valley"
>
> flank do
> archers :task => "setup positions in hills"
> 2nd_ork_platoon :task => "lay low behind hills"
> end
> lose do
> warg_riders :task => "circle compound, attack rear"
> end
> end
>
> (Although, in this scenario, it would seem that if the 1st ork platoon
> loses, the warg riders will attack, but obviously the 2nd ork platoon
> must come to battle once the 1st has been wore down - I think I choose
> a bad example ;->)
Hello Hartog,
well spotted. Nice domain for the example, I like it a lot.
What happens with the sequence is that, well, it executes in sequence, so you
have to put the flanks first. I could force any expressions with flanking
children to grab them and apply them first, but for now I prefer going the
simplest way.
---8<---
repeat do
alpha_platoon :task => 'main push'
over :if => '${success}'
commit_reserve :if => '${reserve_available}'
commit_help_unit :if => '${help_available}', :flank => true
over :if => '${failure}'
end
--->8---
In this [contrived] example, help units could come in and "flank", one at a
time, ending with more than one flank.
Let's try to solve your issue by using concurrence:
---8<---
concurrence do
1st_ork_platoon :task => "attack gates through valley"
archers :task => "setup positions in hills", :flank => true
2nd_ork_platoon :task => "lay low behind hills", :flank => true
warg_riders :task => "circle compound, attack rear", :flank => true
end
--->8---
This concurrence would be over as soon as the 1st platoon is over with its
task. Flanks would be cancelled at that point.
It's close to the initial
---8<---
concurrence :count => 1 do
1st_ork_platoon :task => "attack gates through valley"
archers :task => "setup positions in hills", :lose => true
2nd_ork_platoon :task => "lay low behind hills", :lose => true
warg_riders :task => "circle compound, attack rear", :lose => true
end
--->8---
So I'm not that successful with the introduction of 'flank'...
---8<---
sequence do
# Flanks
archers :task => "setup positions in hills", :flank => true
2nd_ork_platoon :task => "lay low behind hills", :flank => true
warg_riders :task => "circle compound, attack rear", :flank => true
# Schwerpunkt
1st_ork_platoon :task => "attack gates through valley"
end
--->8---
You're right, I'm forcing a potentially non-natural ordering. I think
concurrence + flank, doesn't look to bad (at least it removes the :count).
What do you think ?
--
John Mettraux - http://lambda.io/processi
--
you received this message because you are subscribed to the "ruote users" group.
to post : send email to [email protected]
to unsubscribe : send email to [email protected]
more options : http://groups.google.com/group/openwferu-users?hl=en