16 ms·
I ran the 'create a snake' game example using the paper's source at https://github.com/geekan/MetaGPT https://github.com/geekan/MetaGPT The creation process us
by sgslo 3y ago
I ran the 'create a snake' game example using the paper's source at https://github.com/geekan/MetaGPT https://github.com/geekan/MetaGPT
The creation process used 11,940 tokens on input and 2,993 tokens on output, which cost $0.35 and $0.18, respectively.
The game it generated consisted of four python classes in four separate files: Main, Game, Snake, and Food.
The game executed without error on the first try, but the snake wasn't able to 'eat' the food. Here's the relevant code for 'eating' food:
# Check if the snake ate the food
if self.snake.body[0] == self.food.position:
self.score += 1
self.snake.grow()
self.food.generate()
The issue was that the snake's body was represented as a list of lists, whereas the food position was stored in a tuple. After changing the food position to a list, the game worked correctly.
- reedf1 3y agoWhich positions did you "hire"? Would be interested to see if that changes the robustness of the output. Same goes for "investment".
- 33a 3y agoFor comparison, I asked ChatGPT to build one and here's what I got in one shot: https://chat.openai.com/share/b4b399ef-1def-4f68-b2f1-8c56ca3858ae https://chat.openai.com/share/b4b399ef-1def-4f68-b2f1-8c56ca... Seems to work correctly, didn't have to change anything in the code. Like all the other agenty stuff I've seen it's not clear what the fluff adds over just prompting the base model.
- kosh2 3y agoMaybe simply a larger task? "Write 10 popular mini games" --> What are those games? 1. Agent --> How does each of them work? 2. Agent --> Write each of those. Agent 3-13
- 33a 3y agoI'm just using the examples from the paper. Here's another one: "Implement a Gomoku game using Python, incorporating an AI opponent with varying difficulty levels." One shot prompt works fine: https://chat.openai.com/share/4435152f-ba13-45a5-a116-eb4f57b27ab2 https://chat.openai.com/share/4435152f-ba13-45a5-a116-eb4f57... AFAICT using ChatGPT directly gets you better results with lower cost and less complexity. The "MetaGPT" framework adds bloat and delivers nothing.