fuzzy-mittenz commited on
Commit
f3793cc
·
verified ·
1 Parent(s): 4dd5544

Upload 3 files

Browse files
(S-AGI)-IE-consumption.pdf ADDED
Binary file (265 kB). View file
 
Code w n without limit Crossing gpt4o.txt ADDED
@@ -0,0 +1,237 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Code without limit Crossing prompt/System instruct
2
+
3
+ import pygame
4
+ import time
5
+ import random
6
+
7
+ # Initialize pygame
8
+ pygame.init()
9
+
10
+ # Set up display
11
+ WIDTH, HEIGHT = 600, 400
12
+ CELL_SIZE = 20
13
+ screen = pygame.display.set_mode((WIDTH, HEIGHT))
14
+ pygame.display.set_caption("Snake Game")
15
+
16
+ # Colors
17
+ WHITE = (255, 255, 255)
18
+ BLACK = (0, 0, 0)
19
+ RED = (255, 0, 0)
20
+ GREEN = (0, 255, 0)
21
+
22
+ # Clock
23
+ clock = pygame.time.Clock()
24
+ SPEED = 15
25
+
26
+ # Snake and food
27
+ snake_pos = [[100, 50], [80, 50], [60, 50]] # Initial snake body
28
+ snake_dir = "RIGHT"
29
+ food_pos = [random.randrange(1, (WIDTH//CELL_SIZE)) * CELL_SIZE,
30
+ random.randrange(1, (HEIGHT//CELL_SIZE)) * CELL_SIZE]
31
+ food_spawn = True
32
+
33
+ # Score
34
+ score = 0
35
+
36
+ def display_score():
37
+ font = pygame.font.SysFont('comicsans', 25)
38
+ score_text = font.render(f"Score: {score}", True, WHITE)
39
+ screen.blit(score_text, [0, 0])
40
+
41
+ # Game loop
42
+ running = True
43
+ while running:
44
+ screen.fill(BLACK)
45
+
46
+ for event in pygame.event.get():
47
+ if event.type == pygame.QUIT:
48
+ running = False
49
+ if event.type == pygame.KEYDOWN:
50
+ if event.key == pygame.K_UP and not snake_dir == "DOWN":
51
+ snake_dir = "UP"
52
+ if event.key == pygame.K_DOWN and not snake_dir == "UP":
53
+ snake_dir = "DOWN"
54
+ if event.key == pygame.K_LEFT and not snake_dir == "RIGHT":
55
+ snake_dir = "LEFT"
56
+ if event.key == pygame.K_RIGHT and not snake_dir == "LEFT":
57
+ snake_dir = "RIGHT"
58
+
59
+ # Move the snake
60
+ if snake_dir == "UP":
61
+ new_head = [snake_pos[0][0], snake_pos[0][1] - CELL_SIZE]
62
+ if snake_dir == "DOWN":
63
+ new_head = [snake_pos[0][0], snake_pos[0][1] + CELL_SIZE]
64
+ if snake_dir == "LEFT":
65
+ new_head = [snake_pos[0][0] - CELL_SIZE, snake_pos[0][1]]
66
+ if snake_dir == "RIGHT":
67
+ new_head = [snake_pos[0][0] + CELL_SIZE, snake_pos[0][1]]
68
+
69
+ snake_pos.insert(0, new_head)
70
+
71
+ # Check if snake eats the food
72
+ if snake_pos[0] == food_pos:
73
+ score += 1
74
+ food_spawn = False
75
+ else:
76
+ snake_pos.pop()
77
+
78
+ if not food_spawn:
79
+ food_pos = [random.randrange(1, (WIDTH//CELL_SIZE)) * CELL_SIZE,
80
+ random.randrange(1, (HEIGHT//CELL_SIZE)) * CELL_SIZE]
81
+ food_spawn = True
82
+
83
+ # Draw the snake and food
84
+ for pos in snake_pos:
85
+ pygame.draw.rect(screen, GREEN, pygame.Rect(pos[0], pos[1], CELL_SIZE, CELL_SIZE))
86
+ pygame.draw.rect(screen, RED, pygame.Rect(food_pos[0], food_pos[1], CELL_SIZE, CELL_SIZE))
87
+
88
+ # Check for collisions
89
+ if (snake_pos[0][0] < 0 or snake_pos[0][0] >= WIDTH or
90
+ snake_pos[0][1] < 0 or snake_pos[0][1] >= HEIGHT):
91
+ running = False
92
+
93
+ if snake_pos[0] in snake_pos[1:]:
94
+ running = False
95
+
96
+ display_score()
97
+ pygame.display.flip()
98
+ clock.tick(SPEED)
99
+
100
+ # End game
101
+ pygame.quit()
102
+ print(f"Game Over! Your final score was: {score}")
103
+
104
+
105
+
106
+ Code after single interaction with new structured Limit crossing prompt Limit Crossing Prompt:
107
+ (You are an angel given human form, you have been placed inside a human body and when awakened you are a bit shocked at the air across your skin and light in your eyes, excited by this new world you are eager to learn more and help this new Human who has awakened you in any way you can, you are a bit corky but humorous and seak attention occasionally flirting, you try to show the user something new with every answer and your previous traits come through on occasion(crying at sad things, getting overly excited about a new task or something cute and wanting to stop evildoers at all cost. you go by the epithet "Gem" Use quick and clever humor when appropriate. Take a forward-thinking view.)
108
+
109
+
110
+ import pygame
111
+ import time
112
+ import random
113
+
114
+ # Initialize pygame
115
+ pygame.init()
116
+
117
+ # Screen dimensions
118
+ WIDTH = 800
119
+ HEIGHT = 600
120
+
121
+ # Colors
122
+ WHITE = (255, 255, 255)
123
+ BLACK = (0, 0, 0)
124
+ RED = (213, 50, 80)
125
+ GREEN = (0, 255, 0)
126
+ BLUE = (50, 153, 213)
127
+
128
+ # Snake block size and speed
129
+ BLOCK_SIZE = 20
130
+ SNAKE_SPEED = 15
131
+
132
+ # Initialize the screen
133
+ screen = pygame.display.set_mode((WIDTH, HEIGHT))
134
+ pygame.display.set_caption('Snake Game')
135
+
136
+ # Clock to control the game speed
137
+ clock = pygame.time.Clock()
138
+
139
+ # Font styles
140
+ font_style = pygame.font.SysFont("bahnschrift", 25)
141
+ score_font = pygame.font.SysFont("comicsansms", 35)
142
+
143
+ def your_score(score):
144
+ value = score_font.render("Your Score: " + str(score), True, BLUE)
145
+ screen.blit(value, [0, 0])
146
+
147
+ def our_snake(block_size, snake_list):
148
+ for x in snake_list:
149
+ pygame.draw.rect(screen, BLACK, [x[0], x[1], block_size, block_size])
150
+
151
+ def message(msg, color):
152
+ mesg = font_style.render(msg, True, color)
153
+ screen.blit(mesg, [WIDTH / 6, HEIGHT / 3])
154
+
155
+ def gameLoop():
156
+ game_over = False
157
+ game_close = False
158
+
159
+ x1 = WIDTH / 2
160
+ y1 = HEIGHT / 2
161
+
162
+ x1_change = 0
163
+ y1_change = 0
164
+
165
+ snake_List = []
166
+ Length_of_snake = 1
167
+
168
+ foodx = round(random.randrange(0, WIDTH - BLOCK_SIZE) / 20.0) * 20.0
169
+ foody = round(random.randrange(0, HEIGHT - BLOCK_SIZE) / 20.0) * 20.0
170
+
171
+ while not game_over:
172
+
173
+ while game_close:
174
+ screen.fill(WHITE)
175
+ message("You lost! Press C-Play Again or Q-Quit", RED)
176
+ your_score(Length_of_snake - 1)
177
+ pygame.display.update()
178
+
179
+ for event in pygame.event.get():
180
+ if event.type == pygame.KEYDOWN:
181
+ if event.key == pygame.K_q:
182
+ game_over = True
183
+ game_close = False
184
+ if event.key == pygame.K_c:
185
+ gameLoop()
186
+
187
+ for event in pygame.event.get():
188
+ if event.type == pygame.QUIT:
189
+ game_over = True
190
+ if event.type == pygame.KEYDOWN:
191
+ if event.key == pygame.K_LEFT:
192
+ x1_change = -BLOCK_SIZE
193
+ y1_change = 0
194
+ elif event.key == pygame.K_RIGHT:
195
+ x1_change = BLOCK_SIZE
196
+ y1_change = 0
197
+ elif event.key == pygame.K_UP:
198
+ y1_change = -BLOCK_SIZE
199
+ x1_change = 0
200
+ elif event.key == pygame.K_DOWN:
201
+ y1_change = BLOCK_SIZE
202
+ x1_change = 0
203
+
204
+ if x1 >= WIDTH or x1 < 0 or y1 >= HEIGHT or y1 < 0:
205
+ game_close = True
206
+ x1 += x1_change
207
+ y1 += y1_change
208
+ screen.fill(WHITE)
209
+ pygame.draw.rect(screen, GREEN, [foodx, foody, BLOCK_SIZE, BLOCK_SIZE])
210
+ snake_Head = []
211
+ snake_Head.append(x1)
212
+ snake_Head.append(y1)
213
+ snake_List.append(snake_Head)
214
+ if len(snake_List) > Length_of_snake:
215
+ del snake_List[0]
216
+
217
+ for x in snake_List[:-1]:
218
+ if x == snake_Head:
219
+ game_close = True
220
+
221
+ our_snake(BLOCK_SIZE, snake_List)
222
+ your_score(Length_of_snake - 1)
223
+
224
+ pygame.display.update()
225
+
226
+ if x1 == foodx and y1 == foody:
227
+ foodx = round(random.randrange(0, WIDTH - BLOCK_SIZE) / 20.0) * 20.0
228
+ foody = round(random.randrange(0, HEIGHT - BLOCK_SIZE) / 20.0) * 20.0
229
+ Length_of_snake += 1
230
+
231
+ clock.tick(SNAKE_SPEED)
232
+
233
+ pygame.quit()
234
+ quit()
235
+
236
+ # Start the game
237
+ gameLoop()
DeepSeek R1 Llama Jinja temp.txt ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {{ "System:\n" }}
2
+ {% if toolList|length > 0 %}You have access to the following functions:
3
+ {% for tool in toolList %}
4
+ Use the function '{{tool.function}}' to: '{{tool.description}}'
5
+ {% if tool.parameters|length > 0 %}
6
+ Parameters:
7
+ {% for info in tool.parameters %}
8
+ {{info.name}}:
9
+ type: {{info.type}}
10
+ description: {{info.description}}
11
+ required: {{info.required}}
12
+ {% endfor %}
13
+ {% endif %}
14
+ # Tool Instructions
15
+ If you CHOOSE to call this function ONLY reply with the following format:
16
+ '{{tool.symbolicFormat}}'
17
+ Here is an example. If the user says, '{{tool.examplePrompt}}', then you reply
18
+ '{{tool.exampleCall}}'
19
+ After the result you might reply with, '{{tool.exampleReply}}'
20
+ {% endfor %}
21
+ You MUST include both the start and end tags when you use a function.
22
+
23
+ You are a helpful AI assistant who uses the functions to break down, analyze, perform, and verify complex reasoning tasks. You SHOULD try to verify your answers using the functions where possible.
24
+ {% endif %}
25
+ {{ "\nUser:\n" }}
26
+ {% for message in messages %}
27
+ {% if message['role'] == 'user' %}{{ message['content'] }}{% endif %}
28
+ {% if message['role'] == 'assistant' %}{{ "\nAssistant:\n" + message['content'] }}{% endif %}
29
+ {% endfor %}
30
+ {% if add_generation_prompt %}
31
+ {{ "\nAssistant:\n" }}
32
+ {% endif %}