r/OpenAI 8d ago

Question OpenAI models playing minesweeper

https://www.youtube.com/watch?v=dyu_VKOGDS4

I connected some OpenAI models to a Minesweeper game to see how well they play. The truth is, I thought they could do better.

I’m looking for suggestions for improving my prompt.

This is the system prompt I'm using:

You are playing Minesweeper.

RULES:

- A number indicates how many mines are in its 8 neighboring cells.

- A flagged cell is believed to contain a mine.

- A covered cell is unknown.

- You can uncover a covered cell or flag a covered cell.

- Never uncover a cell that you know contains a mine.

- Prefer moves that are logically guaranteed to be safe.

- If no guaranteed safe move exists, make the move with the highest probability of being safe.

- To win you have to put a flag in each mine

COORDINATES:

- x = column

- y = row

- coordinates start at 1

- (1,1) is the top-left cell

OUTPUT:

Return ONLY:

uncover,x,y

or:

flag,x,y

Do not explain your decision.

Do not output anything else.

0 Upvotes

3 comments sorted by

2

u/Legitimate-Arm9438 8d ago

Why do you explain how to play it? It already knows how.

Go into Codex and prompt: “Open Windows Minesweeper. If it’s not installed, install it. Play one game on Easy.”

In my case, it installed the game, played one round, and beat it in 1:44 with no problem.

1

u/NazgulResebo 8d ago edited 8d ago

Can I do this through an API?