-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathcommittee.erl
54 lines (44 loc) · 1.31 KB
/
committee.erl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This source code and work is provided and developed by Gene I. Sher & DXNN Research Group WWW.DXNNResearch.COM
%
%Copyright (C) 2009 by Gene Sher, DXNN Research Group, [email protected]
%All rights reserved.
%
%This code is licensed under the version 3 of the GNU General Public License. Please see the LICENSE file that accompanies this project for the terms of use.
%%%%%%%%%%%%%%%%%%%% Deus Ex Neural Network :: DXNN %%%%%%%%%%%%%%%%%%%%
-module(committee).
-compile(export_all).
-include("records.hrl").
start()->
case lists:member(committee,registered()) of
true ->
io:format("******** ERROR: Committee already registered, can't start");
false ->
init()
end.
init()->
gen(node()).
gen(Node) ->
PId = spawn(Node,committee,prep,[]),
register(committee,PId),
{ok,PId}.
terminate()->
case lists:member(committee,registered()) of
true ->
committee ! terminate;
false ->
io:format("******** ERROR: Committee not registered, can't terminate")
end.
restart()->
terminate(),
timer:sleep(1000),
start().
prep()->
Population_Id = test,
{A,B,C} = now(),
random:seed(A,B,C),
%TopDX_DIds = get_TopDXDIds(Info,Specie_Ids),
io:format("******** Committee started.~n"),
committee().
committee()->
done.