xFS-bots 0.0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. xFS_bots/graph_models/__init__.py +0 -0
  2. xFS_bots/graph_models/_mg_sample.py +331 -0
  3. xFS_bots/graph_models/action_table.py +395 -0
  4. xFS_bots/graph_models/agent_database.py +77 -0
  5. xFS_bots/graph_models/analog_graph.py +130 -0
  6. xFS_bots/graph_models/analog_schemes.py +320 -0
  7. xFS_bots/graph_models/analog_schemes_aux.py +294 -0
  8. xFS_bots/graph_models/base_node.py +189 -0
  9. xFS_bots/graph_models/bfs.py +69 -0
  10. xFS_bots/graph_models/community.py +389 -0
  11. xFS_bots/graph_models/controverter.py +274 -0
  12. xFS_bots/graph_models/cyclical_navigator.py +241 -0
  13. xFS_bots/graph_models/dependency_seq.py +61 -0
  14. xFS_bots/graph_models/dfs.py +78 -0
  15. xFS_bots/graph_models/dir_imp_path.py +188 -0
  16. xFS_bots/graph_models/eb_graph_navigator.py +326 -0
  17. xFS_bots/graph_models/expr_tree.py +907 -0
  18. xFS_bots/graph_models/game_table.py +129 -0
  19. xFS_bots/graph_models/gcs.py +323 -0
  20. xFS_bots/graph_models/graph_gen.py +462 -0
  21. xFS_bots/graph_models/hg_obj_path.py +421 -0
  22. xFS_bots/graph_models/hg_obj_path_op.py +512 -0
  23. xFS_bots/graph_models/hypergraph.py +221 -0
  24. xFS_bots/graph_models/jamming_graph.py +399 -0
  25. xFS_bots/graph_models/lattice_graph_gen.py +402 -0
  26. xFS_bots/graph_models/micrograph.py +414 -0
  27. xFS_bots/graph_models/modular_graph.py +452 -0
  28. xFS_bots/graph_models/node_navigator_handler.py +31 -0
  29. xFS_bots/graph_models/node_path.py +345 -0
  30. xFS_bots/graph_models/node_priority_function.py +97 -0
  31. xFS_bots/graph_models/node_to_cycle.py +85 -0
  32. xFS_bots/graph_models/path_induction.py +260 -0
  33. xFS_bots/graph_models/pswap_graph.py +440 -0
  34. xFS_bots/graph_models/radial_subgraph.py +106 -0
  35. xFS_bots/graph_models/reactive_simple_graph_rules.py +210 -0
  36. xFS_bots/graph_models/shortest_paths.py +429 -0
  37. xFS_bots/graph_models/shortest_paths_approx.py +461 -0
  38. xFS_bots/graph_models/shortest_paths_type_st.py +119 -0
  39. xFS_bots/graph_models/spanning_tree.py +146 -0
  40. xFS_bots/graph_models/sparse_graph_gen.py +66 -0
  41. xFS_bots/graph_models/tree_gen.py +150 -0
  42. xFS_bots/graph_problems/__init__.py +0 -0
  43. xFS_bots/graph_problems/bkb.py +43 -0
  44. xFS_bots/graph_problems/bkb_ext.py +55 -0
  45. xFS_bots/graph_problems/cb.py +73 -0
  46. xFS_bots/graph_problems/cb_ext.py +61 -0
  47. xFS_bots/graph_problems/drb.py +67 -0
  48. xFS_bots/graph_problems/drb_ext.py +27 -0
  49. xFS_bots/graph_problems/easy_gen.py +429 -0
  50. xFS_bots/graph_problems/easy_gen_default_vars.py +104 -0
  51. xFS_bots/graph_problems/efb.py +145 -0
  52. xFS_bots/graph_problems/efb_ext.py +92 -0
  53. xFS_bots/graph_problems/hfb.py +106 -0
  54. xFS_bots/graph_problems/hfb_ext.py +31 -0
  55. xFS_bots/graph_problems/hte.py +319 -0
  56. xFS_bots/graph_problems/hte_ext.py +165 -0
  57. xFS_bots/graph_problems/ib.py +86 -0
  58. xFS_bots/graph_problems/ib_ext.py +65 -0
  59. xFS_bots/graph_problems/mkb.py +76 -0
  60. xFS_bots/graph_problems/mkb_ext.py +45 -0
  61. xFS_bots/graph_problems/mmb.py +126 -0
  62. xFS_bots/graph_problems/mmb_ext.py +34 -0
  63. xFS_bots/graph_problems/pdib.py +41 -0
  64. xFS_bots/graph_problems/pdib_ext.py +30 -0
  65. xFS_bots/graph_problems/pib.py +138 -0
  66. xFS_bots/graph_problems/pib_ext.py +35 -0
  67. xFS_bots/graph_problems/ptb.py +137 -0
  68. xFS_bots/graph_problems/ptb_ext.py +42 -0
  69. xFS_bots/graph_problems/rnb.py +228 -0
  70. xFS_bots/graph_problems/rnb_ext.py +90 -0
  71. xFS_bots/graph_problems/sb.py +79 -0
  72. xFS_bots/graph_problems/sb_ext.py +67 -0
  73. xFS_bots/graph_problems/sim_solution_search.py +92 -0
  74. xFS_bots/graph_problems/snb.py +115 -0
  75. xFS_bots/graph_problems/snb_ext.py +76 -0
  76. xFS_bots/graph_problems/tftmb.py +54 -0
  77. xFS_bots/graph_problems/tftmb_ext.py +56 -0
  78. xFS_bots/graph_problems/tsb.py +42 -0
  79. xFS_bots/graph_problems/tsb_ext.py +36 -0
  80. xFS_bots/graph_problems/vtb.py +13 -0
  81. xFS_bots/graph_problems/vtb_ext.py +44 -0
  82. xFS_bots/quant/__init__.py +0 -0
  83. xFS_bots/quant/agent_23.py +750 -0
  84. xFS_bots/quant/bool_rules.py +50 -0
  85. xFS_bots/quant/bull_graph.py +434 -0
  86. xFS_bots/quant/ce_agent.py +294 -0
  87. xFS_bots/quant/ce_net.py +228 -0
  88. xFS_bots/quant/cee_map.py +247 -0
  89. xFS_bots/quant/cnf_mask.py +182 -0
  90. xFS_bots/quant/cng.py +243 -0
  91. xFS_bots/quant/controverter_graph.py +247 -0
  92. xFS_bots/quant/default_graph_introproc.py +160 -0
  93. xFS_bots/quant/dual_obj.py +337 -0
  94. xFS_bots/quant/gl_expr_table.py +34 -0
  95. xFS_bots/quant/graph_introspector.py +125 -0
  96. xFS_bots/quant/gt_agent.py +94 -0
  97. xFS_bots/quant/hmm_agent.py +382 -0
  98. xFS_bots/quant/hscript_graph.py +501 -0
  99. xFS_bots/quant/hte_analog_induction.py +81 -0
  100. xFS_bots/quant/hte_aux.py +321 -0
  101. xFS_bots/quant/hte_navigator.py +226 -0
  102. xFS_bots/quant/levenschtein.py +89 -0
  103. xFS_bots/quant/middle_agent.py +221 -0
  104. xFS_bots/quant/middleman_graph.py +346 -0
  105. xFS_bots/quant/mob_graph.py +334 -0
  106. xFS_bots/quant/mutable_ce_net.py +46 -0
  107. xFS_bots/quant/mvec_agent.py +462 -0
  108. xFS_bots/quant/pd_graph.py +318 -0
  109. xFS_bots/quant/pd_inadvertency.py +266 -0
  110. xFS_bots/quant/poison_snt.py +277 -0
  111. xFS_bots/quant/pt_aux.py +346 -0
  112. xFS_bots/quant/qstruct.py +671 -0
  113. xFS_bots/quant/qstruct_aux.py +195 -0
  114. xFS_bots/quant/reactive_graph_introspector.py +103 -0
  115. xFS_bots/quant/rstruct.py +256 -0
  116. xFS_bots/quant/selection_rules.py +227 -0
  117. xFS_bots/quant/simple_hmm_env.py +141 -0
  118. xFS_bots/quant/square_nt.py +94 -0
  119. xFS_bots/quant/static_graph_introspector.py +129 -0
  120. xFS_bots/quant/strangle_form.py +567 -0
  121. xFS_bots/quant/strangle_graph.py +160 -0
  122. xFS_bots/quant/ul_vec_classifier.py +58 -0
  123. xFS_bots/quant/usg_controller.py +84 -0
  124. xFS_bots/quant/vt_graph.py +96 -0
  125. xfs_bots-0.0.1.dist-info/METADATA +208 -0
  126. xfs_bots-0.0.1.dist-info/RECORD +129 -0
  127. xfs_bots-0.0.1.dist-info/WHEEL +5 -0
  128. xfs_bots-0.0.1.dist-info/licenses/LICENSE.txt +19 -0
  129. xfs_bots-0.0.1.dist-info/top_level.txt +1 -0
File without changes
@@ -0,0 +1,331 @@
1
+ from .micrograph import *
2
+
3
+ """
4
+ x--x
5
+ | |
6
+ x--x
7
+ """
8
+ def sample_MicroGraph_1():
9
+ return MicroGraph(dgraph=defaultdict(set,{"0":{"1","2"},"1":{"0","3"},"2":{"0","3"},"3":{"1","2"}}))
10
+
11
+ """
12
+ 1--3--4
13
+ | | |
14
+ 0--2--5
15
+ """
16
+ def sample_MicroGraph_2():
17
+
18
+ return MicroGraph(dgraph=defaultdict(set,{"0":{"1","2"},\
19
+ "1":{"0","3"},\
20
+ "2":{"0","3","5"},\
21
+ "3":{"1","2","4"},\
22
+ "4":{"3","5"},\
23
+ "5":{"2","4"}}))
24
+
25
+ """
26
+
27
+ 2- -3
28
+ \\ //
29
+ 0
30
+ //\\
31
+ 4- -1
32
+ """
33
+ def sample_MicroGraph_3():
34
+ return MicroGraph(dgraph=defaultdict(set,{"0":{"1","2","3","4"},\
35
+ "1":{"0","4"},\
36
+ "2":{"0","3"},\
37
+ "3":{"0","2"},\
38
+ "4":{"0","1"}}))
39
+
40
+ """
41
+ 5 4
42
+ \\ //
43
+ 0--3
44
+ | |
45
+ 1--2
46
+ """
47
+ def sample_MicroGraph_4():
48
+
49
+ return MicroGraph(dgraph=defaultdict(set,{"0":{"1","3","4","5"},\
50
+ "1":{"0","2"},\
51
+ "2":{"1","3"},\
52
+ "3":{"0","2"},\
53
+ "4":{"0"},
54
+ "5":{"0"}}))
55
+
56
+ """
57
+ 0--1--2--3
58
+ """
59
+ def sample_MicroGraph_5():
60
+
61
+ return MicroGraph(dgraph=defaultdict(set,{"0":{"1"},\
62
+ "1":{"0","2"},\
63
+ "2":{"1","3"},\
64
+ "3":{"2"}}))
65
+
66
+ """
67
+ 0--1
68
+ """
69
+ def sample_MicroGraph_6():
70
+ return MicroGraph(dgraph=defaultdict(set,{"0":{"1"},\
71
+ "1":{"0"}}))
72
+
73
+ """
74
+ 0
75
+ """
76
+ def sample_MicroGraph_7():
77
+ return MicroGraph(dgraph=defaultdict(set,{"0":set()}))
78
+
79
+ """
80
+ 0
81
+ // \\
82
+ 1 2
83
+ """
84
+ def sample_MicroGraph_8():
85
+ return MicroGraph(dgraph=defaultdict(set,{"0":{"1","2"},"1":{"0"},"2":{"0"}}))
86
+
87
+ #------------------------------------------------------------------------------------
88
+
89
+ def greatest_common_subgraph_case_1():
90
+ mg4 = MicroGraph(defaultdict(set,\
91
+ {"10":{"11","21"},\
92
+ "11":{"10","21"},\
93
+ "21":{"10","11"}}))
94
+
95
+ mg3 = MicroGraph(defaultdict(set,\
96
+ {"22":{"10","21","33","41"},\
97
+ "10":{"21","22"},\
98
+ "21":{"10","22"},\
99
+ "33":{"22"},\
100
+ "41":{"22"}}))
101
+
102
+ mg2 = MicroGraph(defaultdict(set,\
103
+ {"10":{"12"},\
104
+ "12":{"10","22"},\
105
+ "22":{"12","13","14"},\
106
+ "13":{"22"},\
107
+ "14":{"22"}}))
108
+
109
+ mg1 = MicroGraph(defaultdict(set,\
110
+ {"0":{"1","2"},\
111
+ "1":{"0","2"},\
112
+ "2":{"0","1"}}))
113
+
114
+ return [mg1,mg2,mg3,mg4]
115
+
116
+ def greatest_common_subgraph_case_2():
117
+
118
+ mg1 = MicroGraph(defaultdict(set,\
119
+ {"1":{"2","3"},\
120
+ "2":{"1","3"},\
121
+ "3":{"1","2","4"},\
122
+ "4":{"3"},\
123
+ "6":set()}))
124
+
125
+ mg2 = MicroGraph(defaultdict(set,\
126
+ {"1":{"2","3"},\
127
+ "2":{"1"},\
128
+ "3":{"1","4","5"},\
129
+ "4":{"3","5"},\
130
+ "5":{"3","4"}}))
131
+
132
+ mg3 = MicroGraph(defaultdict(set,\
133
+ {"1":{"2","3"},\
134
+ "2":{"1","3","4"},\
135
+ "3":{"1","2","4"},\
136
+ "4":{"2","3","6"},\
137
+ "5":{"3"},\
138
+ "6":{"4"}}))
139
+
140
+ mg4 = MicroGraph(defaultdict(set,\
141
+ {"1":{"2","4"},\
142
+ "2":{"1","3"},\
143
+ "3":{"2","4"},\
144
+ "4":{"1","3"}}))
145
+
146
+ return [mg1,mg2,mg3,mg4]
147
+
148
+ def greatest_common_subgraph_case_3():
149
+
150
+ mg1 = MicroGraph(defaultdict(set,\
151
+ {"1":{"2","3"},\
152
+ "2":{"1","4"},\
153
+ "3":{"1","4"},\
154
+ "4":{"2","3","5"},\
155
+ "5":{"3","4"}}))
156
+
157
+ mg2 = MicroGraph(defaultdict(set,\
158
+ {"1":{"2"},\
159
+ "2":{"1","3","5","6"},\
160
+ "3":{"2","4"},\
161
+ "4":{"3"},\
162
+ "5":{"2"},\
163
+ "6":{"2"}}))
164
+
165
+ mg3 = MicroGraph(defaultdict(set,\
166
+ {"1":{"2"},\
167
+ "2":{"1","3","4"},\
168
+ "3":{"2"},\
169
+ "4":{"2","5","6"},\
170
+ "5":{"4","6"},\
171
+ "6":{"4","5"}}))
172
+
173
+ mg4 = MicroGraph(defaultdict(set,\
174
+ {"1":set(),\
175
+ "2":{"3"},\
176
+ "3":{"2"},\
177
+ "4":{"5","6"},\
178
+ "5":{"4","6"},\
179
+ "6":{"4","5"}}))
180
+
181
+ return [mg1,mg2,mg3,mg4]
182
+
183
+ #---------------------------------------------------------------------------------------------------------------------------
184
+
185
+ """
186
+
187
+ 0---1
188
+ |\
189
+ | \
190
+ 2 \
191
+ 3
192
+
193
+ """
194
+ def test_dfs_graph_1():
195
+ d = defaultdict(set)
196
+ d[0] = {1,2,3}
197
+ d[1] = {0}
198
+ d[2] = {0}
199
+ d[3] = {0}
200
+ return d
201
+
202
+ """
203
+
204
+ _______
205
+ ____ ____/_______\
206
+ / \/ / \ \
207
+ 0--1--2--3--4--5--6--7--8
208
+ """
209
+ def test_dfs_graph_2():
210
+ d = defaultdict(set)
211
+ d[0] = {1,2}
212
+ d[1] = {0,2}
213
+ d[2] = {0,1,3,5,7}
214
+ d[3] = {2,4,7}
215
+ d[4] = {3,5}
216
+ d[5] = {2,4,6}
217
+ d[6] = {5,7}
218
+ d[7] = {2,3,6,8}
219
+ d[8] = {7}
220
+ return d
221
+
222
+ """
223
+
224
+ 0---1
225
+ | \/|
226
+ | /\|
227
+ 2---3
228
+
229
+ """
230
+ def test_dfs_graph_3():
231
+ d = defaultdict(set)
232
+ d[0] = {1,2,3}
233
+ d[1] = {0,2,3}
234
+ d[2] = {0,1,3}
235
+ d[3] = {0,1,2}
236
+ return d
237
+
238
+ """
239
+
240
+ 0--1--2--3--4
241
+ """
242
+ def test_dfs_graph_4():
243
+ d = defaultdict(set)
244
+ d[0] = {1}
245
+ d[1] = {0,2}
246
+ d[2] = {1,3}
247
+ d[3] = {2,4}
248
+ d[4] = {3}
249
+ return d
250
+
251
+ #----------------------------------- used for testing <CNFGraphMask>
252
+
253
+ """
254
+ 4 6 8 10
255
+ | | | |
256
+ 0--1--2--3
257
+ | | | |
258
+ 5 7 9 11
259
+ """
260
+ def base_graph_sample_E():
261
+
262
+ D = defaultdict(set)
263
+
264
+ D[0] = {1,4,5}
265
+ D[1] = {0,2,6,7}
266
+ D[2] = {1,3,8,9}
267
+ D[3] = {2,10,11}
268
+ D[4] = {0}
269
+ D[5] = {0}
270
+ D[6] = {1}
271
+ D[7] = {1}
272
+ D[8] = {2}
273
+ D[9] = {2}
274
+ D[10] = {3}
275
+ D[11] = {3}
276
+ return D
277
+
278
+ """
279
+ 4 6 _8 _10
280
+ | |/ |/ |
281
+ 0--1--2--3
282
+ |\ |\ | |
283
+ 5 7 9 11
284
+ """
285
+ def base_graph_sample_F():
286
+ D = base_graph_sample_E()
287
+
288
+ D[10] |= {2}
289
+ D[2] |= {10}
290
+
291
+ D[8] |= {1}
292
+ D[1] |= {8}
293
+ D[9] |= {1}
294
+ D[1] |= {9}
295
+
296
+ D[7] |= {0}
297
+ D[0] |= {7}
298
+ return D
299
+
300
+ #---------------------------------- used for testing calculations
301
+ # related to shortest paths.
302
+
303
+ def base_graph_sample_G():
304
+
305
+ return defaultdict(set,{\
306
+ 0:{1,2},\
307
+ 1:{0,3},\
308
+ 2:{0,3},\
309
+ 3:{1,2,4},\
310
+ 4:{3,5,6},\
311
+ 5:{4,7},\
312
+ 6:{4,7},\
313
+ 7:{5,6,8},\
314
+ 8:{7,9,10},\
315
+ 9:{8,11},\
316
+ 10:{8,11},\
317
+ 11:{9,10}})
318
+
319
+ """
320
+ graph is example from Wikipedia article, "Louvain method" (12/31/2025).
321
+ """
322
+ def base_graph_sample_H():
323
+
324
+ return defaultdict(set,\
325
+ {0: {1,2,6},\
326
+ 1: {0,2,4},\
327
+ 2: {0,1,4},\
328
+ 3: {5,6},\
329
+ 4: {1,2,5},\
330
+ 5: {3,4,6},\
331
+ 6: {0,3,5}})