Author |
Topic: Bot lines of code size (Read 826 times) |
|
Janzert
Forum Guru
Arimaa player #247
Gender:
Posts: 1016
|
|
Bot lines of code size
« on: Jan 7th, 2009, 2:04pm » |
Quote Modify
|
After noticing with a simple grep that OpFor appeared to have recently surpassed 10,000 lines of code I was curious enough to download CLOC to check out LoC counts for the bots I had available. Here is the result: OpFor rev.246 (current) ------------------------------------------------------------------------ ------- Language . . files . blank comment . code .scale 3rd gen. equiv ------------------------------------------------------------------------ ------- D . . . . . 8 . 847 . 198 . 10458 x 1.70 = . 17778.60 Python . . . .1 . .17 . . 5 . 165 x 4.20 = . . 693.00 ------------------------------------------------------------------------ ------- SUM: . . . . 9 . 864 . 203 . 10623 x 1.74 = . 18471.60 ------------------------------------------------------------------------ ------- OpFor2008CC ------------------------------------------------------------------------ ------- Language . . files . blank comment . code .scale 3rd gen. equiv ------------------------------------------------------------------------ ------- D . . . . . 8 . 689 . 106 . 6448 x 1.70 = . 10961.60 Python . . . .1 . .17 . . 5 . 165 x 4.20 = . . 693.00 ------------------------------------------------------------------------ ------- SUM: . . . . 9 . 706 . 111 . 6613 x 1.76 = . 11654.60 ------------------------------------------------------------------------ ------- JDB Sample: ------------------------------------------------------------------------ ------- Language . . files . blank comment . code .scale 3rd gen. equiv ------------------------------------------------------------------------ ------- Java . . . . 24 . 2043 . 2138 . 5863 x 1.36 = . .7973.68 DOS Batch . . . 1 . . 1 . . 0 . . 1 x 0.63 = . . 0.63 ------------------------------------------------------------------------ ------- SUM: . . . . 25 . 2044 . 2138 . 5864 x 1.36 = . .7974.31 ------------------------------------------------------------------------ ------- Fairy_full: ------------------------------------------------------------------------ ------- Language . . files . blank comment . code .scale 3rd gen. equiv ------------------------------------------------------------------------ ------- C . . . . . 6 . 122 . .70 . 3071 x 0.77 = . .2364.67 C/C++ Header . . 4 . .32 . .38 . 177 x 1.00 = . . 177.00 ------------------------------------------------------------------------ ------- SUM: . . . . 10 . 154 . 108 . 3248 x 0.78 = . .2541.67 ------------------------------------------------------------------------ ------- Dailey Sample: ------------------------------------------------------------------------ ------- Language . . files . blank comment . code .scale 3rd gen. equiv ------------------------------------------------------------------------ ------- C . . . . . 2 . 501 . 223 . 1338 x 0.77 = . .1030.26 make . . . . 1 . . 6 . . 4 . . 6 x 2.50 = . . 15.00 ------------------------------------------------------------------------ ------- SUM: . . . . 3 . 507 . 227 . 1344 x 0.78 = . .1045.26 ------------------------------------------------------------------------ ------- For OpFor I excluded some automatically generated code (zobrist keys) and some small utility and test source files that aren't directly used by opfor. With JDB's and Don Dailey's I ran it over the whole archive as downloaded from arimaa.com. For Fairy I just used the fairy_full directory as fairy_light and fairy_medium look like duplicate but stripped down versions. Besides the actual counts one other interesting thing of note is JDB's excellence at commenting his code. 2.74 LoC per comment line compared to my own pitiful 52 LoC per comment line. Anyone else want to throw in some more numbers? Janzert
|
« Last Edit: Jan 7th, 2009, 8:10pm by Janzert » |
IP Logged |
|
|
|
jdb
Forum Guru
Arimaa player #214
Gender:
Posts: 682
|
|
Re: Bot lines of code size
« Reply #1 on: Jan 7th, 2009, 4:39pm » |
Quote Modify
|
This is for clueless and the tablebase generator combined. ------------------------------------------------------------------------ ------- Language files blank comment code scale 3rd gen. equiv ------------------------------------------------------------------------ ------- Java 53 4416 4627 14388 x 1.36 = 19567.68 ------------------------------------------------------------------------ ------- SUM: 53 4416 4627 14388 x 1.36 = 19567.68 ------------------------------------------------------------------------ -------
|
« Last Edit: Jan 7th, 2009, 4:40pm by jdb » |
IP Logged |
|
|
|
99of9
Forum Guru
Gnobby's creator (player #314)
Gender:
Posts: 1413
|
|
Re: Bot lines of code size
« Reply #2 on: Jan 9th, 2009, 6:43pm » |
Quote Modify
|
I haven't downloaded the application, but a straight wc tells that I have about 10.5k lines including blanks and comments.
|
|
IP Logged |
|
|
|
fotland
Forum Guru
Arimaa player #211
Gender:
Posts: 216
|
|
Re: Bot lines of code size
« Reply #3 on: Jan 19th, 2009, 7:44pm » |
Quote Modify
|
Bomb is 13.5K total lines, including the GUI. 1200 lines in the search 4500 lines in the board (includes move generation and evaluation)
|
|
IP Logged |
|
|
|
IdahoEv
Forum Guru
Arimaa player #1753
Gender:
Posts: 405
|
|
Re: Bot lines of code size
« Reply #4 on: Jan 20th, 2009, 5:28pm » |
Quote Modify
|
Zombie is about 20 lines longer than Fairy_full. All I added was some time management. The other changes were tweaks to eval that did not affect code length.
|
|
IP Logged |
|
|
|
doublep
Forum Guru
Badger author
Gender:
Posts: 82
|
|
Re: Bot lines of code size
« Reply #5 on: Jan 31st, 2009, 4:42pm » |
Quote Modify
|
I hate this stupid formatting window. I don't know how to post actual table. Anyway, for Badger it currently gives 7900 for C++, 2900 for headers and 4000 for Python. In total 14800 (equiv column). I didn't include tools (gameroom bot interface etc.) and various tests. Also I have many inactive or runtime-inactive (i.e. compiled, but not normally used) code, so "really playing" code is much smaller.
|
|
IP Logged |
|
|
|
|