@@ -157,6 +157,15 @@ long filter_negative_tag(Instance inst) {
157157 return score;
158158}
159159
160+ long filter_lucky (Instance inst) {
161+ for (int i = 0 ; i < 7 ; i++) {
162+ if (inst.random (RandomType::Lucky_Money) >= 1.0 /15 ) {
163+ return 0 ;
164+ }
165+ }
166+ return 1 ;
167+ }
168+
160169long filter_suas_speedrun (Instance inst) {
161170 // First four cards in shop must include Mr. Bones, Merry Andy, and Luchador
162171 bool bones = false , andy = false , luchador = false ;
@@ -190,9 +199,11 @@ long filter_suas_speedrun(Instance inst) {
190199
191200long filter_blank (Instance inst) { return 0 ; }
192201
193- // These won't be permanent filters, just ones I sub in and out while JSON filters aren't ready yet
202+ // These won't be permanent filters, just ones I sub in and out while JSON
203+ // filters aren't ready yet
194204long filter_test (Instance inst) {
195- // Four Fingers, Shortcut, and Smeared Joker in first two antes (https://discord.com/channels/1325151824638120007/1326284714125955183)
205+ // Four Fingers, Shortcut, and Smeared Joker in first two antes
206+ // (https://discord.com/channels/1325151824638120007/1326284714125955183)
196207 bool fingers = false ;
197208 bool shortcut = false ;
198209 bool smeared = false ;
@@ -245,7 +256,7 @@ void benchmark() {
245256 std::cout << " ------LONGER TESTING------\n " ;
246257 std::cout << " Total time: " << end - start << " ms\n " ;
247258 std::cout << " Seeds per second: " << std::fixed << std::setprecision (0 )
248- << 1000000000 / ((end - start) / 1000.0 ) << " \n " ;
259+ << 1000000000 / ((end - start) / 1000.0 ) << " \n " ;
249260}
250261
251262void benchmark_quick () {
@@ -260,10 +271,28 @@ void benchmark_quick() {
260271 long end = std::chrono::duration_cast<std::chrono::milliseconds>(
261272 std::chrono::system_clock::now ().time_since_epoch ())
262273 .count ();
263- std::cout << " ----PERKEO OBSERVATORY----\n " ;
264- std::cout << " Total time: " << end - start << " ms\n " ;
265- std::cout << " Seeds per second: " << std::fixed << std::setprecision (0 )
266- << 100000000 / ((end - start) / 1000.0 ) << " \n " ;
274+ std::cout << " ----PERKEO OBSERVATORY----\n " ;
275+ std::cout << " Total time: " << end - start << " ms\n " ;
276+ std::cout << " Seeds per second: " << std::fixed << std::setprecision (0 )
277+ << 100000000 / ((end - start) / 1000.0 ) << " \n " ;
278+ }
279+
280+ void benchmark_quick_lucky () {
281+ long total = 0 ;
282+ long start = std::chrono::duration_cast<std::chrono::milliseconds>(
283+ std::chrono::system_clock::now ().time_since_epoch ())
284+ .count ();
285+ Search search (filter_lucky, " IMMOLATE" , 12 , 100000000 );
286+ search.highScore = 10 ; // No output
287+ search.printDelay = 100000000000 ;
288+ search.search ();
289+ long end = std::chrono::duration_cast<std::chrono::milliseconds>(
290+ std::chrono::system_clock::now ().time_since_epoch ())
291+ .count ();
292+ std::cout << " -------LUCKY CARDS-------\n " ;
293+ std::cout << " Total time: " << end - start << " ms\n " ;
294+ std::cout << " Seeds per second: " << std::fixed << std::setprecision (0 )
295+ << 100000000 / ((end - start) / 1000.0 ) << " \n " ;
267296}
268297
269298void benchmark_single () {
@@ -278,10 +307,10 @@ void benchmark_single() {
278307 long end = std::chrono::duration_cast<std::chrono::milliseconds>(
279308 std::chrono::system_clock::now ().time_since_epoch ())
280309 .count ();
281- std::cout << " ----SINGLE THREADED PO----\n " ;
282- std::cout << " Total time: " << end - start << " ms\n " ;
283- std::cout << " Seeds per second: " << std::fixed << std::setprecision (0 )
284- << 10000000 / ((end - start) / 1000.0 ) << " \n " ;
310+ std::cout << " ----SINGLE THREADED PO----\n " ;
311+ std::cout << " Total time: " << end - start << " ms\n " ;
312+ std::cout << " Seeds per second: " << std::fixed << std::setprecision (0 )
313+ << 10000000 / ((end - start) / 1000.0 ) << " \n " ;
285314}
286315
287316void benchmark_blank () {
@@ -301,14 +330,10 @@ void benchmark_blank() {
301330 << 100000000 / ((end - start) / 1000.0 ) << " \n " ;
302331}
303332
304- void run_filter (std::function<int (Instance)> f) {
305- Search search (f, 12 );
306- search.search ();
307- }
308-
309333int main () {
310334 benchmark_single ();
311335 benchmark_quick ();
336+ benchmark_quick_lucky ();
312337 benchmark_blank ();
313338 benchmark ();
314339 return 1 ;
0 commit comments