International Monetary Policy Coordination

I have constructed a two-country DSGE model with symmetric preferences and technologies. I would like to solve for the optimal monetary policy of each country in a non-cooperative Cournot type of a game. I would like the central bank in each country to have an objective function which stabilizes fluctuations in domestic inflation and output growth taking the other country’s output growth and inflation as given. I would like to implement this with the ramsey policy or the optimal simple rule command if possible. The difficulty comes from the fact that I want the optimization to happen simultaneously in each country. Is anyone familiar with a benchmark code that I could work with? Or do you have any ideas how this could be implemented in dynare? I would rather work with a non-linear model.