Is the set of hyperelliptic curves with a K-point closed? I am actually interested in the same question for more general kinds of curves, but I will be specific.
Let $K$ be a field and $\overline{K}$ be an algebraic closure of $K$. Let's say that a "hyperelliptic curve" is a smooth projective $K$-curve $C$ of genus $\ge 2$ such that there is a degree $2$ morphism $C_{\overline{K}} \to \mathbb{P}^1_{\overline{K}}$. Let $M_g$ be the (coarse) moduli space of hyperelliptic curves of genus $g$. Given $a \in M_g(K)$ let $C_a$ be the corresponding hyperelliptic $K$-curve. Let $X$ be the set of $a \in M_g(K)$ such that $C_a$ has a $K$-point.
Now suppose that $K$ is a local field or maybe $\mathbb{C}((t))$ and equip $M_g(K)$ with the resulting topology. Is $X$ a closed subset of $M_g(K)$? This seems like it should be true.
 A: In the "more sophisticated" direction, we can ask a similar question about the moduli stack $\mathscr{M}_g$ of hyperelliptic curves of genus $g$. If $K$ is a topological field, there is a natural topology on the set $\vert\mathscr{M}_g(K)\vert$ of isomorphism classes of of genus $g$ hyperelliptic curves over $K$: a subset $\Omega$ of $\vert\mathscr{M}_g(K)\vert$ is open if for every family $f:C\to S$ of genus $g$ hyperelliptic curves over a $K$-variety $S$, the set $\Omega(f):=\left\{s\in S(K)\mid C_s\in\Omega\right\}$ is open in $S(K)$. If you take for $\Omega$ the set of curves with a rational point, then $\Omega(f)$ is just the image of $f(K):C(K)\to S(K)$.
Assume now that $K$ is a valued field, with completion $\widehat{K}$. Here is what I know:

*

*If $K$ is henselian, the map $f(K)$ is open because $f$ is smooth, so $\Omega(f)$ is open.

*If $K$ is a local field (i.e. locally compact) then $f(K)$ is topologically proper (because $f$ is proper) and in particular closed, so $\Omega(f)$ is closed.

*For henselian $K$ it is not true in general that $f(K)$ is a closed map. However, if  $\widehat{K}/K$ is a separable extension (e.g. if $K$ is complete, or has characteristic zero) then $f(K)$ has closed image. This follows from the "strong approximation property", see [3], Theorem 1.3.

All this works for other moduli problems, or when $K$ is a field with an archimedean absolute value, in which case "henselian" means "algebraically closed or real closed", and "local" means $\mathbb{R}$ or $\mathbb{C}$.
Of course, in case a fine moduli scheme $M$ exists, the meaning of "open" (resp. "closed") is the naive one, as formulated in the question. This is the case for instance for the moduli $U_g$ of curves of genus $g\geq3$ without nontrivial automorphisms.
For general facts on topologizing points of stacks, see:
[1] L. Moret-Bailly, Problèmes de Skolem sur les champs algébriques, Compositio Math. 125(1) (2001), 1–30; doi:10.1023/A:1002686625404.
[2] K. Cesnavicius, Topology on cohomology of local fields, Forum of Mathematics (2015) https://doi.org/10.1017/fms.2015.18
For the strong approximation property as used above:
[3] L. Moret-Bailly, An extension of Greenberg’s theorem to general valuation rings, Manuscripta Math (2011), doi:10.1007/s00229-011-0510-5.
