kangaroo-wild using precomputed and selected DP

19 replies 172 views
chad21Full Member
Posts: 55 · Reputation: 357
#1Jul 30, 2018, 06:30 AM
I'm curious about how quickly a regular PC with standard RAM and no GPU can find a key in a smaller range like 2^74 2^75. So, I went ahead and created my own version of the kangaroo algorithm: https://github.com/arulbero/kangaroo-wild On my laptop (Alder Lake 12th Gen Intel(R) Core(TM) i7-12700H), it takes roughly 3 seconds for each key. It's a bit quicker if I search for multiple keys at once. The program can also find keys in higher ranges (like 2^77 2^78 or 2^80 2^81) using the same database. Database size: 6GB.
5 Reply Quote Share
grimomegaMember
Posts: 28 · Reputation: 171
#2Jul 30, 2018, 11:54 AM
hi there arulbero, the 2nd file is not available anymore, could you help out, thanks for this another master piece
1 Reply Quote Share
chad21Full Member
Posts: 55 · Reputation: 357
#3Jul 30, 2018, 12:33 PM
Now it should work.
1 Reply Quote Share
grimomegaMember
Posts: 28 · Reputation: 171
#4Jul 30, 2018, 01:32 PM
./kangaroo_wild extend 037e1238f7b1ce757df94faa9a2eb261bf0aeb9f84dbf81212104e78931c2a19dc 79 80 [PARAMS] V2 loaded: local=12 jump=9 hist=4 esc=128 mult=2000 min_dp=1 trunc=11 [PARAMS] GLOBAL_BITS=16 RANGE=74-75 DIST_BYTES=8 TRUNC_BITS=11 [PARAMS] scored_target_dp=268435456 seed=42 local_buf1=64 [PARAMS] q_hat=0.428733 R_factor=1.1 N_sel=536870912 [JUMP_TABLE] target_dp=268435456 gap=3.52e+13 opt=137438953472 (2^37.0) ==================================================== [DB] 4194304.00 KB | 536870912 entries (disk: 8 B/entry, dist:8, trunc:11) [FP] Fingerprints: 2097152.00 KB (536870912 entries) [BO] Bucket offsets: 16384.00 KB (HASH_INDEX_BITS=22, u32) ==================================================== --- KANGAROO WILD --- [CONFIG] Range: 2^74 - 2^75 | GLOBAL_BITS: 16 | DIST_BYTES: 8 | TRUNC_BITS: 11 [CONFIG] Workers: 60 | Batch: 20 | C: 1200 | VITA: 4194304 [EXTEND] Range 2^79 - 2^80 | DB 2^74 - 2^75 | 32 partitions [KEY 1/1] Searching (extend 2^79-2^80, 32 parts): 037e1238f7b1ce757df94faa9a2eb261bf0aeb9f84dbf81212104e78931c2a19dc [EXTEND 1/1] 140.2M steps | 46.5M/s | 3s elapsed [EXTEND 1/1] 313.2M steps | 52.0M/s | 6s elapsed [EXTEND 1/1] 523.3M steps | 58.0M/s | 9s elapsed [EXTEND 1/1] 789.1M steps | 65.6M/s | 12s elapsed [EXTEND 1/1] 1143.2M steps | 76.1M/s | 15s elapsed [EXTEND 1/1] 1609.9M steps | 89.3M/s | 18s elapsed [EXTEND 1/1] 2126.0M steps | 101.1M/s | 21s elapsed [EXTEND 1/1] 2667.9M steps | 111.0M/s | 24s elapsed [!!!] KEY FOUND (f2 m1/1 delta=710 partition=26): 0x61a5c66dcc11b5ad180 [SOLVED 1/1] Key: 0xea1a5c66dcc11b5ad180 (part 26) | Steps: 2862.9M | Time: 25.133s ============================================================            STEP ACCOUNTING REPORT ============================================================  Total steps:               2862.87M ------------------------------------------------------------  BREAKDOWN:    life_limit rsp:                0    buf1 (cycle) rsp:              2    escape rsp:                    0    escape jumps:            6866748    avg life at rsp:         1780856 ------------------------------------------------------------  DP STATS:    DP global hits:            43611    DP filtered (k):               0    DP saved:                      0  WILD STATS:    DP checked vs DB:          43611    DB matches:                    1 ============================================================ [!!!] PRIVATE KEY: 0xea1a5c66dcc11b5ad180 wow did not expected this one, thought on extend parallel and or do we get saved dps or tames or wilds in this one or is it needed just to ask, what to edit for this besides the 23 you did, and or threads or batch, after compiling the file it does not take in the -b and or -w just keeps the settings from the file, no problem btw,
3 Reply Quote Share
chad21Full Member
Posts: 55 · Reputation: 357
#5Jul 30, 2018, 03:12 PM
I removed the -w - b options because the program runs slower. I just update the program and the flag of compiler. I'm working on a new version of the db, time to retrieve a key: -25% On my pc these are the results with the new database: - sequential search :  2.2 seconds for each key (16 workers, 20 batch_k, 74-75 bit range) - parallel search : 1.1 seconds for each key (16 workers, 60 batch_k, 74-75 bit range) - parallel search: 46 seconds for each key (16 workers, 60 batch_k, 80-81 bit range) On AWS (c8id.metal-48xl instance, 96 core 3.9 GHz, 2 thread for each core): - sequential search: 0.46 seconds for each key (192 workers, 20 batch_k, 74-75 bit range) - parallel search: 0.072 seconds for each key (192 workers, 60 batch_k, 74-75 bit range) - parallel search: 6 seconds for each key (192 workers, 60 batch_k, 80-81 bit range) - parallel search: about 45 seconds for each key (192 workers, 60 batch_k, 84-85 bit range)
5 Reply Quote Share
grimomegaMember
Posts: 28 · Reputation: 171
#6Jul 30, 2018, 05:36 PM
can't wait to test that one to, thanks for explaining showing the details, what would be the best setting to setup this code for the 135th puzzle,
5 Reply Quote Share
Posts: 10 · Reputation: 109
#7Jul 30, 2018, 09:42 PM
Git link not work, some one share new link    or upload full git + compile file use https://gofile.io @arulbero why deleted git ?
3 Reply Quote Share
chad21Full Member
Posts: 55 · Reputation: 357
#8Jul 31, 2018, 02:06 AM
This program is only for the short range 2^74-2^75 and for a few bits more (like 80 or 84). It doesn't make sense trying to resolve the 135th puzzle with a cpu, gpus are way more fast.   Only in this short range "cpu with the database of the precomputed dp" is like (more or less) to "a gpu" At the moment the program can search to 2**74 * (2**12) = 2**74 * 4096 = 2**86 - 2**87 range: if you want to search in the 2**100 - 2**101 range: 26 means that it takes 2^26 times more than time to 2^74-75 range, let's say it takes 1s on 2^74-75, are you sure you want to wait 2^26 seconds = 2 years? I didn't delete anything, the link is ok. ********************************************************************************* EDIT: Database updated! Enjoy the speedup!
2 Reply Quote Share
Posts: 10 · Reputation: 109
#9Jul 31, 2018, 08:12 AM
i was share my screenshot https://pikwy.com/web/69b16f7b158aa71c200dd2ad  . you can see "404 this is not the page you are looking for" what happen i cant see git someone help to download this git files https://github.com/arulbero/kangaroo-wild thankyou
3 Reply Quote Share
chad21Full Member
Posts: 55 · Reputation: 357
#10Jul 31, 2018, 09:23 AM
You are right, there is a problem with my github account, I uploaded the code + DB files here:   https://gofile.io/d/9af4a6a1-ae82-43a7-9cf1-a1374e39e040 To compile:   gcc -O3 -march=native -falign-functions=32 -falign-loops=32 kangaroo_wild.c G_stub.c -o kangaroo_wild -pthread -lm -flto
3 Reply Quote Share
leo2017Member
Posts: 5 · Reputation: 107
#11Jul 31, 2018, 10:15 AM
Indeed , your version is faster than keyhunt bsgs . Puzzle 75 - Time: 0.216s Puzzle 80 - Time: 1.016s Puzzle 85 - Time: 118.365s
0 Reply Quote Share
chad21Full Member
Posts: 55 · Reputation: 357
#12Jul 31, 2018, 12:02 PM
Thanks. Note: the kangaroo algorithm is probabilistic, to have a real measure you need to test at least 1000 keys to get "a mean time". And to have a better time with different keys I think it is better 384 x 60 instead of 384 x 20.  118s is too much for 85 bit, my average time is 65s (and 1s for 80 bit is too low), you should get under 40s (mean time) for 85 bit, and median time usually is even better.   For 80 bit you should get around 3s (or maybe "your" cores are faster than mine?) 85 bit should be about 2^5 = 32 times 80 bit, not 120 times. This is the readme file:
4 Reply Quote Share
leo2017Member
Posts: 5 · Reputation: 107
#13Jul 31, 2018, 12:47 PM
Ok, I've done some tests, here are my results.  Workers: 384 | Batch: 60
5 Reply Quote Share
chad21Full Member
Posts: 55 · Reputation: 357
#14Jul 31, 2018, 01:37 PM
30/50 keys -> too much variance, if you do these tests again probably you will get very different results. You should get around 3s for 80 bit and around 50s (maybe, I'm not 100% sure) for 85 bit. Do tests with 1000 keys each.
4 Reply Quote Share
leo2017Member
Posts: 5 · Reputation: 107
#15Jul 31, 2018, 02:12 PM
I got the idea, more tests , less variance. If anyone interested, here is my tames generation script which works with your kangaroo_wild. Maybe a lot of things to do and make it better. https://github.com/providiu/tames-gen/ It might be not fully functional but to get an ideea about tames generations. Also requires a modified version of kangaroo_wild.c Hunting for puzzles with CPU is a dead end anyway.
2 Reply Quote Share
chad21Full Member
Posts: 55 · Reputation: 357
#16Aug 2, 2018, 05:04 AM
I never said that this program is about finding 135 key, it is about 74-80 bit range search on normal pc without gpu. If you can access to a pc with 192 cores / 192 thread you can use it to search 85-90 bit, but the db is build and optimized for the 74-75 range.
1 Reply Quote Share
leo2017Member
Posts: 5 · Reputation: 107
#17Aug 2, 2018, 06:55 AM
To generate a DB 77 it take about 12 days and also a lot of RAM and SSD space needed.
5 Reply Quote Share
chad21Full Member
Posts: 55 · Reputation: 357
#18Aug 2, 2018, 07:47 AM
From 74-75  to 76-77 you need to recover 2 bits:  or you pass from 2GB+4GB to 2GB+16GB, or you pass to 2GB + 8GB and from 16 global bits to 17 global bits and in the tame phase you can exploit all the power of your pc:  384 x 256 --> 2.2 G steps/s
4 Reply Quote Share
leo2017Member
Posts: 5 · Reputation: 107
#19Aug 2, 2018, 10:20 AM
I will try to generate a DB 77 but it will take a lot of time. I will let you know when finishes and made some tests.
1 Reply Quote Share
5tack5atsSenior Member
Posts: 142 · Reputation: 897
#20Aug 2, 2018, 12:06 PM
Or you can just store DPs continuously as they are found, with zero RAM overhead, and simply improve the DB each and every time a new DLP is solved. If you need a lot of RAM and 12 days, you have a bad understanding / bad implementation of the algorithm... if the purpose is to build a static DB of "best DPs", this is only "best" for the solver parameters (computing power) that you have in mind, and would not help at all solving higher ranges, or solving via something magnitudes of times faster (such as a GPU large-scale cluster).
3 Reply Quote Share

Related topics