Brickficiency

My experience with Brickficiency

Brickficiency is program created by Myles Doupe that finds the optimal way to order a set of Legos from multiple sellers. Below are the steps I took when using this program for the first time.

There is now a newer version, which seems to work pretty well, though the programs interface has changed from what is listed below.

There is another program called Brick Wizard. I have not tried it, but it appears to do the same thing. I'm curious if it is faster, it should be, as it is written in C++ whereas Brickficiency is written in Perl.

Summary

When it comes down to it, the process is fairly simple. The first time you use it, it will should take about an hour to get going and quicker subsequent times. Instructions have been updated for the 2.0 release.
  1. Have a list of parts you want to buy
  2. Install Brickficiency (on a Windows machine)
  3. Install Brickstock *
  4. Enter your parts into Brickstore, save your list as a .bsx file
  5. Import the .bsx file into Brickficiency and search for parts (I find I needed to enter my username and password in the 2.x release for it to work)
  6. Wait for the web page result to appear, click on the store links and buy from Bricklink
* You can also import bricklink wanted list or use another program to generate the .bsx xml file.

Steps (story)

  1. Several months ago, I heard of a MATLAB based script that does what this program does, but I don't have MATLAB and I did not try to use Octave (open source alternative).
  2. In the meantime, I saw a Lego Reddit post talking about Brickficiency.
  3. When it came time to order more pieces for my Nebraska State Capitol project, I found the post and downloaded the Brickficiency program from its project page.
  4. Reading through the instructions, everything seemed clear enough. The author does warn that the program is fairly rough from a user interface point of view, but if it got the job done, I would be happy with it.
  5. There is no installation, just unzip the .exe to your harddrive and double click. For non-windows users, the author created the program in perl and the source is at the project link above. Perhaps Wine would be an option.
  6. After opening it up, it asks you for some basic information for what you need, as shown below: Brickficiency Screenshot
  7. Most of the options are straight forward, you can see what I chose above. Besides the country codes, the most important setting is the 'Maximum combination query'. Selecting 3 goes through every combination of 3 stores looking for the complete set of parts. Selecting 4 goes through every combination of 4 stores, etc. This gets slow fast. Because of this, you can run it through on '3' evaluate the results, then go through on 4, then 5 I believe this is done automatically if you do NOT 'continue looking for larger combinations if a smaller one has been found'.
  8. The only remaining step was to tell it which pieces I wanted. It supports two ways:
    1. Download from Bricklink Wanted List *
    2. Open a .bsx file
    I chose the former, having used the Bricklink xml format before. The Brickficiency project page discusses the .bsx option. I've listed my wanted list below for completeness. I was only looking for eight different parts (lots) for a total of 92 bricks.
    * The lastest version allows you to import the inventory xml format from a local file rather than downloading from your wanted list, though the last (only) time I tried, it failed to parse the xml file.
  9. A quick note on downloading from Bricklink, you must specify a Wanted list name or ID. "Main" is the default one, so type that in. You do have to specify your user name and password, if this makes you feel uncomfortable, use the .bsx route. After entering that information, click import, wait, then click continue (unless there is a login error).
  10. This then launches the download and search portion, which can take some time to run. I took under a minute to download all of the store information and under a minute to search all combination of two stores. I also ran it for three store combination, which took over five minutes on this step alone.
  11. In total, there were 754 stores that had the pieces I wanted. After viewing this, you can (and only can) click "Quit and view report".
  12. This brings up a nice HTML page (which you can see below) showing you the top 10 combinations of stores. The cheapest combination had what I needed for $6. Note that this does not include shipping and handling.
  13. The html report that was generated gives you links to each store and while you cannot click on individual bricks in the store, copying the description of the brick (i.e. "Tan Slope 45 2 x 2 Double Convex") and searching the store worked just fine for me.
  14. After this, it is just a matter of putting each brick in your cart and ordering like normal. As stated before, mind the shipping costs. Also, some stores have lot and minimum buy restricitons, which are not handled by this Brickficiency; which is why you would want multiple results shown (default is 10). Also, seller feedback may be something to watch for.

Review

Overall, I was very happy with this program and would recommend it to anyone looking for the best deal on Lego bricks via Bricklink.

The project can be found here, please donate if you find it useful. I always hate finding website with broken links, so I've archived version 0.85. To be clear, I did not create this program nor maintain it and it may be out of date. If the author wishes me to remove this archive, I will (see my contact information).

My wanted list

These are the pieces I needed, listed in the Bricklink XML format. There are 8 lots for a total of 96 pieces.
<INVENTORY>
    <ITEM>
        <ITEMTYPE>P</ITEMTYPE>
        <ITEMID>3045</ITEMID>
        <COLOR>2</COLOR>
        <MINQTY>8</MINQTY>
    </ITEM>
    <ITEM>
        <ITEMTYPE>P</ITEMTYPE>
        <ITEMID>3794</ITEMID>
        <COLOR>2</COLOR>
        <MINQTY>16</MINQTY>
    </ITEM>
    <ITEM>
        <ITEMTYPE>P</ITEMTYPE>
        <ITEMID>3022</ITEMID>
        <COLOR>85</COLOR>
        <MINQTY>16</MINQTY>
    </ITEM>
    <ITEM>
        <ITEMTYPE>P</ITEMTYPE>
        <ITEMID>3021</ITEMID>
        <COLOR>85</COLOR>
        <MINQTY>16</MINQTY>
    </ITEM>
    <ITEM>
        <ITEMTYPE>P</ITEMTYPE>
        <ITEMID>3795</ITEMID>
        <COLOR>85</COLOR>
        <MINQTY>4</MINQTY>
    </ITEM>
    <ITEM>
        <ITEMTYPE>P</ITEMTYPE>
        <ITEMID>3004</ITEMID>
        <COLOR>11</COLOR>
        <MINQTY>8</MINQTY>
    </ITEM>
    <ITEM>
        <ITEMTYPE>P</ITEMTYPE>
        <ITEMID>3010</ITEMID>
        <COLOR>11</COLOR>
        <MINQTY>8</MINQTY>
    </ITEM>
    <ITEM>
        <ITEMTYPE>P</ITEMTYPE>
        <ITEMID>3002</ITEMID>
        <COLOR>11</COLOR>
        <MINQTY>16</MINQTY>
    </ITEM>
</INVENTORY>

Brickficiency Report

This is the report I got from Brickficiency given my wanted list. I will note the actual report looks a bit better than what is listed below, but the basics are here.
-
Parts list sorted by number of stores
70 stores have Tan Slope 45 2 x 2 Double Convex
210 stores have Tan Plate, Modified 1 x 2 with 1 Stud (Jumper)
348 stores have Black Brick 2 x 3
396 stores have Black Brick 1 x 4
449 stores have Black Brick 1 x 2
449 stores have Dark Bluish Gray Plate 2 x 2
490 stores have Dark Bluish Gray Plate 2 x 3
508 stores have Dark Bluish Gray Plate 2 x 6
-
2 store solutions
-
Match #1 : $ 6 ($ 1.2, $ 4.8)

(US) CD's Bricks (270407)
Tan Slope 45 2 x 2 Double Convex8 @ 0.151.2
Total: 1.2
-
(US) Studmart (117039)
Black Brick 1 x 28 @ 0.050.4
Black Brick 1 x 48 @ 0.080.64
Black Brick 2 x 316 @ 0.050.8
Dark Bluish Gray Plate 2 x 216 @ 0.050.8
Dark Bluish Gray Plate 2 x 316 @ 0.040.64
Dark Bluish Gray Plate 2 x 64 @ 0.060.24
Tan Plate, Modified 1 x 2 with 1 Stud (Jumper)16 @ 0.081.28
Total: 4.8
-
-
Match #2 : $ 6.08 ($ 1.93, $ 4.15)

(CA) Keep the fun(k) going (141197)
Black Brick 1 x 22 @ 0.060.12
Dark Bluish Gray Plate 2 x 21 @ 0.050.05
Tan Slope 45 2 x 2 Double Convex8 @ 0.221.76
Total: 1.93
-
(CA) LLC Brickland (320857)
Black Brick 1 x 26 @ 0.030.18
Black Brick 1 x 48 @ 0.060.48
Black Brick 2 x 316 @ 0.071.12
Dark Bluish Gray Plate 2 x 215 @ 0.030.45
Dark Bluish Gray Plate 2 x 316 @ 0.040.64
Dark Bluish Gray Plate 2 x 64 @ 0.040.16
Tan Plate, Modified 1 x 2 with 1 Stud (Jumper)16 @ 0.071.12
Total: 4.15
-
-
Match #3 : $ 6.36 ($ 2.21, $ 4.15)

(US) Brickitecture (107487)
Black Brick 1 x 22 @ 0.080.16
Dark Bluish Gray Plate 2 x 21 @ 0.050.05
Tan Slope 45 2 x 2 Double Convex8 @ 0.252
Total: 2.21
-
(CA) LLC Brickland (320857)
Black Brick 1 x 26 @ 0.030.18
Black Brick 1 x 48 @ 0.060.48
Black Brick 2 x 316 @ 0.071.12
Dark Bluish Gray Plate 2 x 215 @ 0.030.45
Dark Bluish Gray Plate 2 x 316 @ 0.040.64
Dark Bluish Gray Plate 2 x 64 @ 0.040.16
Tan Plate, Modified 1 x 2 with 1 Stud (Jumper)16 @ 0.071.12
Total: 4.15
-
-
Match #4 : $ 6.37 ($ 2.22, $ 4.15)

(US) Piles O Plastic (282414)
Black Brick 1 x 22 @ 0.080.16
Dark Bluish Gray Plate 2 x 21 @ 0.060.06
Tan Slope 45 2 x 2 Double Convex8 @ 0.252
Total: 2.22
-
(CA) LLC Brickland (320857)
Black Brick 1 x 26 @ 0.030.18
Black Brick 1 x 48 @ 0.060.48
Black Brick 2 x 316 @ 0.071.12
Dark Bluish Gray Plate 2 x 215 @ 0.030.45
Dark Bluish Gray Plate 2 x 316 @ 0.040.64
Dark Bluish Gray Plate 2 x 64 @ 0.040.16
Tan Plate, Modified 1 x 2 with 1 Stud (Jumper)16 @ 0.071.12
Total: 4.15
-
-
Match #5 : $ 6.48 ($ 2.32, $ 4.16)

(CA) Keep the fun(k) going (141197)
Black Brick 1 x 48 @ 0.070.56
Tan Slope 45 2 x 2 Double Convex8 @ 0.221.76
Total: 2.32
-
(US) Studmart (117039)
Black Brick 1 x 28 @ 0.050.4
Black Brick 2 x 316 @ 0.050.8
Dark Bluish Gray Plate 2 x 216 @ 0.050.8
Dark Bluish Gray Plate 2 x 316 @ 0.040.64
Dark Bluish Gray Plate 2 x 64 @ 0.060.24
Tan Plate, Modified 1 x 2 with 1 Stud (Jumper)16 @ 0.081.28
Total: 4.16
-
-
Match #6 : $ 6.59 ($ 2.44, $ 4.15)

(US) Littlefigs (230757)
Black Brick 1 x 22 @ 0.070.14
Dark Bluish Gray Plate 2 x 21 @ 0.060.06
Tan Slope 45 2 x 2 Double Convex8 @ 0.282.24
Total: 2.44
-
(CA) LLC Brickland (320857)
Black Brick 1 x 26 @ 0.030.18
Black Brick 1 x 48 @ 0.060.48
Black Brick 2 x 316 @ 0.071.12
Dark Bluish Gray Plate 2 x 215 @ 0.030.45
Dark Bluish Gray Plate 2 x 316 @ 0.040.64
Dark Bluish Gray Plate 2 x 64 @ 0.040.16
Tan Plate, Modified 1 x 2 with 1 Stud (Jumper)16 @ 0.071.12
Total: 4.15
-
-
Match #7 : $ 6.64 ($ 1.2, $ 5.44)

(US) CD's Bricks (270407)
Tan Slope 45 2 x 2 Double Convex8 @ 0.151.2
Total: 1.2
-
(US) A-Bout Bricks (97692)
Black Brick 1 x 28 @ 0.050.4
Black Brick 1 x 48 @ 0.100.8
Black Brick 2 x 316 @ 0.091.44
Dark Bluish Gray Plate 2 x 216 @ 0.040.64
Dark Bluish Gray Plate 2 x 316 @ 0.040.64
Dark Bluish Gray Plate 2 x 64 @ 0.060.24
Tan Plate, Modified 1 x 2 with 1 Stud (Jumper)16 @ 0.081.28
Total: 5.44
-
-
Match #8 : $ 6.64 ($ 1.84, $ 4.8)

(US) Brian's Bricks (2023)
Tan Slope 45 2 x 2 Double Convex8 @ 0.231.84
Total: 1.84
-
(US) Studmart (117039)
Black Brick 1 x 28 @ 0.050.4
Black Brick 1 x 48 @ 0.080.64
Black Brick 2 x 316 @ 0.050.8
Dark Bluish Gray Plate 2 x 216 @ 0.050.8
Dark Bluish Gray Plate 2 x 316 @ 0.040.64
Dark Bluish Gray Plate 2 x 64 @ 0.060.24
Tan Plate, Modified 1 x 2 with 1 Stud (Jumper)16 @ 0.081.28
Total: 4.8
-
-
Match #9 : $ 6.66 ($ 3.16, $ 3.5)

(CA) Keep the fun(k) going (141197)
Black Brick 1 x 28 @ 0.060.48
Black Brick 1 x 48 @ 0.070.56
Dark Bluish Gray Plate 2 x 216 @ 0.050.8
Tan Slope 45 2 x 2 Double Convex6 @ 0.221.32
Total: 3.16
-
(US) CreativeFury (94820)
Black Brick 2 x 316 @ 0.060.96
Dark Bluish Gray Plate 2 x 316 @ 0.040.64
Dark Bluish Gray Plate 2 x 64 @ 0.060.24
Tan Plate, Modified 1 x 2 with 1 Stud (Jumper)16 @ 0.081.28
Tan Slope 45 2 x 2 Double Convex2 @ 0.190.38
Total: 3.5
-
-
Match #10 : $ 6.76 ($ 2.96, $ 3.8)

(US) Brian's Bricks (2023)
Black Brick 2 x 316 @ 0.071.12
Tan Slope 45 2 x 2 Double Convex8 @ 0.231.84
Total: 2.96
-
(US) FREE SHIPPING DEALS! (3961)
Black Brick 1 x 28 @ 0.050.4
Black Brick 1 x 48 @ 0.060.48
Dark Bluish Gray Plate 2 x 216 @ 0.040.64
Dark Bluish Gray Plate 2 x 316 @ 0.040.64
Dark Bluish Gray Plate 2 x 64 @ 0.050.2
Tan Plate, Modified 1 x 2 with 1 Stud (Jumper)16 @ 0.091.44
Total: 3.8
-

LEGO, LEGOLAND, DACTA, DUPLO, PRIMO, FABULAND, SCALA, TECHNIC, MINDSTORMS, and ZNAP, etc. are trademarks or registered trademarks of The LEGO Group, which does not sponsor, authorize, or endorse this site.