Official version here, preprint version at arXiv:1609.01838 [math.NT].

The *defect* of a curve over a finite field is the difference between the
number of rational points on the curve and the Weil–Serre upper bound for the
number of points on the curve. We present algorithms for constructing curves of
genus 5, 6, and 7 with small defect. Our aim is to be able to produce, in
a reasonable amount of time, curves that can be used to populate the online
table of curves with many points found at
manypoints.org.