TITLE: Free category with product and coproduct
QUESTION [11 upvotes]: Is there a known description of the free category with both product and coproduct?
That is, given a small category $C$, I want to consider a category $U C$ which has product and coproduct, a functor $C \to U C$ and such that $UC$ is universal for functor preserving both product and coproduct. The case $C = \emptyset$ is already interesting.
I'm also happy to focus on finite product and finite coproduct, especially if it avoids some size problems, though I don't think this is essential.
My guess is that this category should be a category of two-player games (player and opponent) with morphisms being simulation and where outcome of the game are marked by objects of $C$ (if $C = \emptyset$ we should just have a win/lose outcome):
The coproduct of a family of games is the game where the player first chooses which game he wants to play in the family, while their product is the game where the opponent chooses which game he wants to play. The initial object is the game where player loses at the start, and the final object is the one where opponent loses at the start.
But the details of this, and especially the proper definition of the morphisms are a bit involved, so I'm curious whether this has been worked out somewhere.
Of course, as soon as we assume compatibility between product and coproduct (for e.g. distributivity) there are simple description, but here I'm interested in the completely unconstrained situation.

REPLY [12 votes]: The general problem of giving a categorical construction of the free category with finite coproducts and products (or "free sum–product category") seems to still be open, though there are several works on special cases of the problem.
Cockett–Santocanale's On the word problem for ΣΠ-categories, and the properties of two-way communication gives a good introduction to the problem. They state:

There have been, directly or indirectly, a number of contributions towards
our goal in this paper. [...] These related results, however, work only for the fragment without units – or, more precisely, for the fragment with a common initial and final object. As far we know, there is no representation theorem for the full fragment with distinct units.

Special cases of interest include:

A syntactic construction of the free category with finite coproducts and products (and various characterisations): Finite sum–product logic, Cockett and Seely.
A construction of the free category with coproducts, products and a zero object: Coherence Completions of Categories and Their Enriched Softness, Hu and Joyal.
A construction of the free category with nonempty finite coproducts and products: A canonical graphical syntax for non-empty finite products and sums, Hughes.

Joyal has two related papers (at least for general colimits and limits), but unfortunately without explicit constructions or proofs:

Free bicomplete categories.
Free bicompletion of enriched categories.