We have fabricated ballistic cavities from a two-dimensional GaAs elec
tron gas in which the Fermi energy. can be varied independent of cavit
y shape. For each cavity, we have measured the magnetoconductance G(B)
of many individual members of an ensemble, with each member labeled b
y its Fermi energy. We find that G(B) of a single ensemble member does
not always display the minimum at B = 0 which is the signature of wea
k localization. By averaging over our ensemble, we have obtained the e
nergy-averaged weak-localization effect for each cavity shape. The ave
rage result does display the expected minimum at B = 0. We compare our
results with recent analytical theories and numerical simulations of
weak localization in cavities with chaotic classical scattering and fi
nd good quantitative agreement.