Pin that arousal updates before it drains resolve on the same tick
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
9842cec85f
commit
a0488275c6
1 changed files with 18 additions and 0 deletions
|
|
@ -122,6 +122,24 @@ public sealed class ArousalTests
|
|||
Assert.True(rig.Actor.Drive.Resolve > minResolve);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Arousal_updates_before_it_drains_resolve_on_the_same_tick()
|
||||
{
|
||||
var rig = new SensoryRig(SensoryRig.One(0.55), pull: 0.5);
|
||||
for (var i = 0; i < 100; i++)
|
||||
{
|
||||
rig.Tick();
|
||||
if (rig.Actor.Load > 0.0) break;
|
||||
Assert.Equal(0.0, rig.Actor.Drive.Arousal);
|
||||
Assert.Equal(1.0, rig.Actor.Drive.Resolve);
|
||||
}
|
||||
|
||||
Assert.True(rig.Actor.Load > 0.0, "the load arrives within the conduction delay");
|
||||
// On the tick the load first arrives, arousal has already risen and already drained: read a tick late, resolve would still be 1.
|
||||
Assert.True(rig.Actor.Drive.Arousal > 0.0);
|
||||
Assert.True(rig.Actor.Drive.Resolve < 1.0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Without_emitters_or_without_senses_arousal_and_load_stay_exactly_zero()
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue