Desire

class mobrob_behcon.desires.desire.Desire(value, strength, function=None)[source]

The class Desire

A desire consist of

  • a value (any number/array),

  • a dynamic strength (0.0 - 1.0) and

  • a static priority (0 - 100)

  • a function to be executed if desire is accepted (optional)

The priority will be set when Desire is forwarded to resolver.

Methods

__init__(value, strength[, function])

Construct a new 'Desire' object.

set_priority(priority)

Setter for attribute priority

Details

__init__(value, strength, function=None)[source]

Construct a new ‘Desire’ object.

Parameters
  • value – the numberic value of the desire, can be also be a array/list

  • strength – the strength of the desire

  • function – the function need to be executed when desire is accepted (optional)

Returns

returns nothing

set_priority(priority)[source]

Setter for attribute priority

Parameters

priority – priority to be set

Returns

returns nothing