|
||
Title: Bot lines of code size Post by Janzert on Jan 7th, 2009, 2:04pm 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 (http://cloc.sourceforge.net/) 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 |
||
Title: Re: Bot lines of code size Post by jdb on Jan 7th, 2009, 4:39pm 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 ------------------------------------------------------------------------------- |
||
Title: Re: Bot lines of code size Post by 99of9 on Jan 9th, 2009, 6:43pm I haven't downloaded the application, but a straight wc tells that I have about 10.5k lines including blanks and comments. |
||
Title: Re: Bot lines of code size Post by fotland on Jan 19th, 2009, 7:44pm Bomb is 13.5K total lines, including the GUI. 1200 lines in the search 4500 lines in the board (includes move generation and evaluation) |
||
Title: Re: Bot lines of code size Post by IdahoEv on Jan 20th, 2009, 5:28pm 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. |
||
Title: Re: Bot lines of code size Post by doublep on Jan 31st, 2009, 4:42pm 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. |
||
Arimaa Forum » Powered by YaBB 1 Gold - SP 1.3.1! YaBB © 2000-2003. All Rights Reserved. |