upon log in > play a random file from the database
when file is over > random choose another one
(no looping)
2. film dialogues: (2 systems ...final goal is the 2nd one)
global variables:
-Time is discrete t= 0,1,2,3.... (so we can control the pace of the system)
Agents at time. Assign an identifier to each agent as they come and go => i= {1,2,3,...,k (t)} (numbers of users at each time)
at all time t and for each agent i=1,...k(t) there will be needed of these variables:
a_it boolean (whether the ith agent is active; 1= active 0=non-active [active means it plays a dialogue (call), alive mean connected in the system]
d_it integer (the duration of agent i call) [call refers to playing a dialogue]
age_i := present - birth_i (the duration of agent alive on the system)
(these variables will be needed for nor or more complex implementation)
- Simple random playback (all have agents have same probability)
if at all time t, sum of active agents a_it = 0 then random choose an agent i for the pool.
if at all time t, the sum (over i) of the a_it is at most 1 then do nothing. (one dialogue at a time)
when sum(over i) of the a_it is equal to 0 again, choose random delay time (20sec to 3 min), then choose another agent to become active (play)
general remarks:
the system shall work with weighted probabilities so that some agents (or users) will be favoured or penalised in the random choice for playing a dialogue.
the
playback based on based on weighted probabilities:
procedure of creature weight for live agents (to favour or penalize agents)
(1) favour agents that have not been active for long time
wi = sum{j=0 to t} (1 - a_ij) (2**{j-t})
(2) favour agents that are close to active agents (if there is one). Use localisation / distance to the active users
A possibility is to fix a q (say 6) and to give weight 1 to the q closest neighbors and
weight 0 to the others
procedure select_agent
this procedure chooses one agent (but it is allowed to choose
none) in the set of "live" agents using a the weights in
create_weights and the procedure "random". It is called if and
only if the number of active agents is smaller than 2.
Here is the pseudocode (for weights w1, …, wk)
B[1] := w[1]
for i = 2 … k do
B[i] := B[i-1] + w[i]
end for
x := random( )
x := x * B[k]
chosen := 0
i := 1
while chosen = 0 do
if x <= B[i] then chosen := i
else i := i + 1
end while
return chosen
1. background sound
upon log in > play a random file from the database when file is over > random choose another one (no looping)
2. film dialogues: (2 systems ...final goal is the 2nd one)
global variables: -Time is discrete t= 0,1,2,3.... (so we can control the pace of the system)
at all time t and for each agent i=1,...k(t) there will be needed of these variables:
(these variables will be needed for nor or more complex implementation)
if at all time t, sum of active agents a_it = 0 then random choose an agent i for the pool.
if at all time t, the sum (over i) of the a_it is at most 1 then do nothing. (one dialogue at a time)
when sum(over i) of the a_it is equal to 0 again, choose random delay time (20sec to 3 min), then choose another agent to become active (play)
general remarks:
procedure of creature weight for live agents (to favour or penalize agents)
(1) favour agents that have not been active for long time
wi = sum{j=0 to t} (1 - a_ij) (2**{j-t})
(2) favour agents that are close to active agents (if there is one). Use localisation / distance to the active users
A possibility is to fix a q (say 6) and to give weight 1 to the q closest neighbors and weight 0 to the others
procedure select_agent
this procedure chooses one agent (but it is allowed to choose none) in the set of "live" agents using a the weights in create_weights and the procedure "random". It is called if and only if the number of active agents is smaller than 2. Here is the pseudocode (for weights w1, …, wk)