def zephyrize(self): clock = self.environment.clock() zepy.advertise(self.environment, clock) zepy.advertise(self.demons, clock) for rewardFunction in self.rewards: zepy.monattr(rewardFunction, 'rewardValue', clock=clock, label=rewardFunction.label)
def zephyrize(self): Zephyr.registerLabeledCollection(self, "demons", "") monitoredList = [self.verifiers, self.environment, self.demons] for monitored in monitoredList: zepy.advertise(monitored, self.clock) self.logfile.add(monitored, 0) monitor = ZephyrPlotting.createMonitor(self.clock) for rewardFunction in self.rewards: zepy.monattr(rewardFunction, "rewardValue", clock=self.clock, label=rewardFunction.label())
def zephyrize(self): Zephyr.registerLabeledCollection(self, "demons", "") monitoredList = [self.verifiers, self.environment, self.demons] for monitored in monitoredList: zepy.advertise(monitored, self.clock) self.logfile.add(monitored, 0) monitor = ZephyrPlotting.createMonitor(self.clock) for rewardFunction in self.rewards: zepy.monattr(rewardFunction, 'rewardValue', clock=self.clock, label=rewardFunction.label())
def zephyrize(self): clock = self.environment.clock() zepy.advertise(self.environment, clock) zepy.advertise(self.demons, clock) for rewardFunction in self.rewards: zepy.monattr(rewardFunction, 'rewardValue', clock = clock, label = rewardFunction.label)
def zephyrize(self): zepy.advertise(self.clock, self.environment) zepy.advertise(self.clock, self.horde) for rewardFunction in self.rewards: zepy.monattr(self.clock, rewardFunction, 'rewardValue', label = rewardFunction.label)
def run(self): clock = zepy.clock() zepy.monattr(clock, self, 'monitoredAttribute') zepy.monfunc(clock, (lambda: -self.monitoredAttribute), name="Function") while clock.tick(): self.monitoredAttribute = (self.monitoredAttribute + 1) % 10
def __init__(self): self.clock = zepy.Clock("HelloZephyr") self.value = 0 zepy.monattr(self.clock, self, "value") zepy.monattr(self.clock, self, "someValue")