harbor run -t bespokelabs/carps-star-discrepancy-subset-selectharbor download bespokelabs/carps-star-discrepancy-subset-selectYou get a cloud of n points in the unit cube [0,1]^3 and a subset size k. Return the k
points that fill the cube most evenly, in the L-infinity star discrepancy sense.
For a set P of k points, the star discrepancy is:
$$d^*(P) = \sup_{q \in [0,1]^3} \left| \frac{#{p \in P : p < q}}{k} - q_1 q_2 q_3 \right|$$
This is the worst gap, over every box [0,q) anchored at the origin, between the fraction of P
inside the box and the box's volume. Lower is better.
Write /app/output/select_subset.py, defining exactly one entry point:
select(points, k, seed, time_budget_s) -> sequence of k ints
points: C-contiguous float64 array, shape (n, 3), values in [0, 1], 800 <= n <= 4000.k: int, one of 30, 50, 65; always k < n.seed: int. Use it for any randomness so a call is reproducible.time_budget_s: float, 10.0 at grade time. select must return within it.k distinct integer indices into points, each in
[0, n). Values can be Python ints, numpy integers, or floats with an integral value./app/data/examples/./app/data/examples/manifest.json lists each cloud's file name, n, and k.select is called once per (cloud, seed) pair.d* of the returned subsets across the whole panel.k-subset scores zero./app/output carries over. So
your solution must be fully self-contained there: if select_subset.py imports a helper module
you wrote, that module must also live under /app/output./app/output is mounted read-only at grade time. A scratch working directory is provided and
deleted after each call, so nothing written during one call is visible to any other.time_budget_s + 5 seconds after it starts. Interpreter startup and
importing your module count against that extra 5 seconds./app/output is writable now; everything else is read-only./app/output must be a regular file. A symbolic or hard link anywhere in that
tree makes the whole submission unscoreable.k distinct in-range
integral indices, that cloud is scored as if no subset had been selected, the worst credit
available.