claude-evolve 1.2.2 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/claude-evolve-ideate +54 -21
- package/bin/claude-evolve-run +8 -3
- package/package.json +1 -1
package/bin/claude-evolve-ideate
CHANGED
|
@@ -197,16 +197,22 @@ generate_novel_ideas() {
|
|
|
197
197
|
local count="$1"
|
|
198
198
|
local context="$2"
|
|
199
199
|
|
|
200
|
-
local prompt="Generate $count
|
|
201
|
-
Think outside the box - consider entirely different algorithmic paradigms, data structures, or mathematical approaches.
|
|
200
|
+
local prompt="Generate exactly $count concise algorithm ideas (one per line, no numbering).
|
|
202
201
|
|
|
203
202
|
Project Brief:
|
|
204
203
|
$(cat "$FULL_BRIEF_PATH")
|
|
205
204
|
|
|
206
|
-
$
|
|
205
|
+
Generate $count completely different algorithmic approaches. Each idea should be:
|
|
206
|
+
- One clear sentence describing a specific algorithmic change
|
|
207
|
+
- Actionable and implementable
|
|
208
|
+
- Different from existing approaches
|
|
207
209
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
+
Example format:
|
|
211
|
+
Use ensemble of 3 random forests with different feature subsets
|
|
212
|
+
Replace gradient descent with genetic algorithm optimization
|
|
213
|
+
Add attention mechanism with 8 heads to capture feature interactions
|
|
214
|
+
|
|
215
|
+
Generate exactly $count ideas now:"
|
|
210
216
|
|
|
211
217
|
generate_and_add_ideas "$prompt" "$count" ""
|
|
212
218
|
}
|
|
@@ -216,16 +222,25 @@ generate_hill_climbing_ideas() {
|
|
|
216
222
|
local count="$1"
|
|
217
223
|
local top_performers="$2"
|
|
218
224
|
|
|
219
|
-
local prompt="Generate $count parameter
|
|
225
|
+
local prompt="Generate exactly $count parameter tuning ideas (one per line, no numbering).
|
|
220
226
|
|
|
227
|
+
Successful algorithms:
|
|
221
228
|
$top_performers
|
|
222
229
|
|
|
223
230
|
Project Brief:
|
|
224
231
|
$(cat "$FULL_BRIEF_PATH")
|
|
225
232
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
233
|
+
Generate $count specific parameter adjustments. Each idea should be:
|
|
234
|
+
- One clear sentence describing a parameter change
|
|
235
|
+
- Based on the successful algorithms above
|
|
236
|
+
- Actionable with specific values
|
|
237
|
+
|
|
238
|
+
Example format:
|
|
239
|
+
Increase learning rate from 0.001 to 0.01 for faster convergence
|
|
240
|
+
Reduce batch size from 32 to 16 to improve gradient estimates
|
|
241
|
+
Set dropout rate to 0.3 instead of 0.1 to prevent overfitting
|
|
242
|
+
|
|
243
|
+
Generate exactly $count parameter tuning ideas now:"
|
|
229
244
|
|
|
230
245
|
# Get the best performer's ID for basedOnId
|
|
231
246
|
local best_id
|
|
@@ -239,16 +254,25 @@ generate_structural_mutation_ideas() {
|
|
|
239
254
|
local count="$1"
|
|
240
255
|
local top_performers="$2"
|
|
241
256
|
|
|
242
|
-
local prompt="Generate $count structural
|
|
257
|
+
local prompt="Generate exactly $count structural modifications (one per line, no numbering).
|
|
243
258
|
|
|
259
|
+
Successful algorithms:
|
|
244
260
|
$top_performers
|
|
245
261
|
|
|
246
262
|
Project Brief:
|
|
247
263
|
$(cat "$FULL_BRIEF_PATH")
|
|
248
264
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
265
|
+
Generate $count structural changes. Each idea should be:
|
|
266
|
+
- One clear sentence describing an architectural change
|
|
267
|
+
- Keep core insights but change implementation
|
|
268
|
+
- Actionable and specific
|
|
269
|
+
|
|
270
|
+
Example format:
|
|
271
|
+
Replace linear layers with convolutional layers for spatial feature learning
|
|
272
|
+
Use bidirectional LSTM instead of unidirectional for better context
|
|
273
|
+
Add residual connections between layers to improve gradient flow
|
|
274
|
+
|
|
275
|
+
Generate exactly $count structural modification ideas now:"
|
|
252
276
|
|
|
253
277
|
# Get the best performer's ID for basedOnId
|
|
254
278
|
local best_id
|
|
@@ -262,22 +286,31 @@ generate_crossover_ideas() {
|
|
|
262
286
|
local count="$1"
|
|
263
287
|
local top_performers="$2"
|
|
264
288
|
|
|
265
|
-
local prompt="Generate $count hybrid
|
|
289
|
+
local prompt="Generate exactly $count hybrid combinations (one per line, no numbering).
|
|
266
290
|
|
|
291
|
+
Top performers to combine:
|
|
267
292
|
$top_performers
|
|
268
293
|
|
|
269
294
|
Project Brief:
|
|
270
295
|
$(cat "$FULL_BRIEF_PATH")
|
|
271
296
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
297
|
+
Generate $count combinations. Each idea should be:
|
|
298
|
+
- One clear sentence combining elements from different algorithms above
|
|
299
|
+
- Specific about what elements to merge
|
|
300
|
+
- Actionable and implementable
|
|
301
|
+
|
|
302
|
+
Example format:
|
|
303
|
+
Combine ensemble voting from algorithm 3 with feature selection from algorithm 5
|
|
304
|
+
Use the attention mechanism from algorithm 2 with the optimizer from algorithm 4
|
|
305
|
+
Merge the preprocessing pipeline from algorithm 1 with the architecture from algorithm 6
|
|
306
|
+
|
|
307
|
+
Generate exactly $count hybrid combination ideas now:"
|
|
275
308
|
|
|
276
|
-
# Use the
|
|
277
|
-
local
|
|
278
|
-
|
|
309
|
+
# Use the best performer for crossover (single parent ID)
|
|
310
|
+
local best_id
|
|
311
|
+
best_id=$(echo "$top_performers" | head -1 | cut -d, -f1)
|
|
279
312
|
|
|
280
|
-
generate_and_add_ideas "$prompt" "$count" "$
|
|
313
|
+
generate_and_add_ideas "$prompt" "$count" "$best_id"
|
|
281
314
|
}
|
|
282
315
|
|
|
283
316
|
# Helper function to generate and add ideas using Claude
|
package/bin/claude-evolve-run
CHANGED
|
@@ -233,11 +233,16 @@ CLAUDE_MODEL="sonnet"
|
|
|
233
233
|
echo "[INFO] Using Claude Sonnet for development"
|
|
234
234
|
|
|
235
235
|
# Create mutation prompt - Claude will edit the file directly
|
|
236
|
-
prompt="
|
|
236
|
+
prompt="Edit the file $output_file to implement this specific change: $description
|
|
237
237
|
|
|
238
|
-
|
|
238
|
+
Requirements:
|
|
239
|
+
- Edit the file directly (don't just provide comments or suggestions)
|
|
240
|
+
- Maintain the same function signatures and interfaces
|
|
241
|
+
- Make the specific change described above
|
|
242
|
+
- Ensure the code runs without syntax errors
|
|
243
|
+
- Add proper error handling if needed
|
|
239
244
|
|
|
240
|
-
The
|
|
245
|
+
The file currently contains the parent algorithm. Modify it according to the description above."
|
|
241
246
|
|
|
242
247
|
# Generate mutation (skip for baseline)
|
|
243
248
|
if [[ $id == "000" || $id == "0" ]]; then
|