-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathsim.h
128 lines (104 loc) · 3.52 KB
/
sim.h
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
/*
Ordo is program for calculating ratings of engine or chess players
Copyright 2013 Miguel A. Ballicora
This file is part of Ordo.
Ordo is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Ordo is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Ordo. If not, see <http://www.gnu.org/licenses/>.
*/
#if !defined(H_SIM)
#define H_SIM
/*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
#include "boolean.h"
#include "mytypes.h"
#include "sysport.h"
extern mythread_mutex_t Smpcount;
extern mythread_mutex_t Groupmtx;
extern mythread_mutex_t Summamtx;
extern mythread_mutex_t Printmtx;
void
get_a_simulated_run ( int limit
, bool_t quiet_mode
, double beta
, double drawrate_evenmatch_result
, double white_advantage_result
, const struct RATINGS *pRA
, const struct prior *PP_ori
, const struct rel_prior_set *pRPset_ori
, struct ENCOUNTERS *pEncounters // output
, struct PLAYERS *pPlayers // output
, struct GAMES *pGames // output
, struct prior *PP // output
, struct rel_prior_set *pRPset // output
)
;
extern void
save_simulated(struct PLAYERS *pPlayers, struct GAMES *pGames, int num);
extern void
simul
( long simulate
, bool_t sim_updates
, bool_t quiet_mode
, bool_t prior_mode
, bool_t adjust_white_advantage
, bool_t adjust_draw_rate
, bool_t anchor_use
, bool_t anchor_err_rel2avg
, double general_average
, player_t anchor
, player_t priored_n
, double beta
, double drawrate_evenmatch_result
, double white_advantage_result
, const struct rel_prior_set * rps
, const struct prior * pPrior
, struct prior wa_prior
, struct prior dr_prior
, struct ENCOUNTERS * encount // io, modified
, struct PLAYERS * plyrs // io, modified
, struct RATINGS * rat // io, modified
, struct GAMES * pGames // io, modified
, struct rel_prior_set RPset_work // mem provided
, struct prior * PP_work // mem provided
, struct summations * p_sfe_io // output
)
;
void
simul_smp
( int cpus
, long simulate
, bool_t sim_updates
, bool_t quiet_mode
, bool_t prior_mode
, bool_t adjust_white_advantage
, bool_t adjust_draw_rate
, bool_t anchor_use
, bool_t anchor_err_rel2avg
, double general_average
, player_t anchor
, player_t priored_n
, double beta
, double drawrate_evenmatch_result
, double white_advantage_result
, const struct rel_prior_set * rps
, const struct prior * pPrior
, struct prior wa_prior
, struct prior dr_prior
, struct ENCOUNTERS * encount // io, modified
, struct PLAYERS * plyrs // io, modified
, struct RATINGS * rat // io, modified
, struct GAMES * pGames // io, modified
, struct rel_prior_set RPset_work // mem provided
, struct prior * PP_work // mem provided
, struct summations * p_sfe_io // output
)
;
/*<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
#endif