Subtables horizontal

subtablestables

How can I make these subtables horizontally instead of vertically positioned?

\documentclass[12pt]{article}

\usepackage[utf8]{inputenc}
\usepackage[(margin=1in)]{geometry}
\usepackage{setspace}
\setstretch{1}
\begin{table}[ht!]

\begin{subtable}[t]{\textwidth}
\centering
\begin{tabular}{cc|cc|}
\cline{3-4}
                                         &            & \multicolumn{2}{c|}{B}                      \\ \cline{3-4} 
                                         &            & \multicolumn{1}{c|}{Free Flow} & Regulation \\ \hline
\multicolumn{1}{|c|}{\multirow{2}{*}{A}} & Free Flow  & \multicolumn{1}{c|}{(3, 3)}    & (2, 5)     \\ \cline{2-4} 
\multicolumn{1}{|c|}{}                   & Regulation & \multicolumn{1}{c|}{(5, 2)}    & (1, 1)     \\ \hline
\end{tabular}

\caption{Prisoner's dilemma}
\label{f1}
\end{subtable}

\hfill

\begin{subtable}[t]{\textwidth}
\centering
\begin{tabular}{cl|cc|}
\cline{3-4}
                                         &            & \multicolumn{2}{c|}{B}                                           \\ \cline{3-4} 
\multicolumn{1}{l}{}                     &            & \multicolumn{1}{l|}{Free Flow} & \multicolumn{1}{l|}{Regulation} \\ \hline
\multicolumn{1}{|c|}{\multirow{2}{*}{A}} & Free Flow  & \multicolumn{1}{c|}{(5, 5)}    & (1, 3)                          \\ \cline{2-4} 
\multicolumn{1}{|c|}{}                   & Regulation & \multicolumn{1}{c|}{(3, 1)}    & (2, 2)                          \\ \hline
\end{tabular}
\caption{Stag Hunt}
\label{f2}
\end{subtable}

\caption{Policy Decision Matrix}
\label{F1}
\end{table}

Best Answer

The two most important changes you should make in order to achieve you typesetting objective are (a) eliminate the all-blank lines right before and right after \hfill, and (b) change the widths of the subtable environments from \textwidth to, say, 0.45\textwidth.

In the following example, I've also streamlined and simplified your code a bit. Some of the simplifications are made possible by changing \begin{tabular}{cc|cc|} to \begin{tabular}{|l|l|c|c|}.

enter image description here

\documentclass[12pt]{article}

\usepackage{array,subcaption,multirow}
%\usepackage[utf8]{inputenc} % that's the default nowadays
\usepackage[margin=1in]{geometry}
\usepackage{setspace}
\setstretch{1}
\newcommand\blank[1]{\multicolumn{#1}{l|}{}}

\begin{document}
\begin{table}[ht!]
\setlength\extrarowheight{2pt}
\setlength\tabcolsep{4pt} % default: 6pt

\begin{subtable}[t]{0.45\textwidth}
\centering
\begin{tabular}{|l|l|c|c|}
\cline{3-4}
\blank{2} & \multicolumn{2}{c|}{B} \\ 
\cline{3-4} 
\blank{2} & Free Flow & Regulation \\ 
\hline
\multirow{2}{*}{A} & Free Flow  & (3, 3) & (2, 5) \\ 
\cline{2-4} 
                   & Regulation & (5, 2) & (1, 1) \\ 
\hline
\end{tabular}
\caption{Prisoner's dilemma}
\label{f1}
\end{subtable}
\hfill
\begin{subtable}[t]{0.45\textwidth}
\centering
\begin{tabular}{|l|l|c|c|}
\cline{3-4}
\blank{2} & \multicolumn{2}{c|}{B} \\ 
\cline{3-4} 
\blank{2} & Free Flow & Regulation \\ 
\hline
\multirow{2}{*}{A} & Free Flow  & (5, 5) & (1, 3) \\ 
\cline{2-4} 
                   & Regulation & (3, 1) & (2, 2) \\ 
\hline
\end{tabular}
\caption{Stag Hunt}
\label{f2}
\end{subtable}

\caption{A table with two subtables}
\end{table}
\end{document}