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.
@@ -197,16 +197,22 @@ generate_novel_ideas() {
197
197
  local count="$1"
198
198
  local context="$2"
199
199
 
200
- local prompt="Generate $count completely novel algorithm approaches for this problem.
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
- $context
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
- Provide $count creative, innovative ideas that explore fundamentally different solution approaches.
209
- Format: One idea per line, no numbering, no extra formatting."
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 optimization ideas based on these successful algorithms:
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
- Focus on tuning parameters, constants, thresholds, sizes, iteration counts, and optimization parameters.
227
- Make small incremental improvements to the existing successful approaches.
228
- Format: One idea per line, no numbering, no extra formatting."
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 algorithm modifications based on these successful algorithms:
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
- Keep the core algorithmic insights but redesign the implementation approach.
250
- Consider: different data structures, alternative algorithms for sub-components, different execution patterns.
251
- Format: One idea per line, no numbering, no extra formatting."
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 algorithms that combine successful approaches from these top performers:
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
- Create novel combinations that merge the best aspects of different successful algorithms.
273
- Consider: what makes each successful? How could they complement each other?
274
- Format: One idea per line, no numbering, no extra formatting."
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 top two performers for crossover
277
- local parent_ids
278
- parent_ids=$(echo "$top_performers" | head -2 | cut -d, -f1 | tr '\n' '+' | sed 's/+$//')
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" "$parent_ids"
313
+ generate_and_add_ideas "$prompt" "$count" "$best_id"
281
314
  }
282
315
 
283
316
  # Helper function to generate and add ideas using Claude
@@ -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="Please edit file $output_file to implement the following change for iteration $id: $description
236
+ prompt="Edit the file $output_file to implement this specific change: $description
237
237
 
238
- There may be extra information in documentation in the $FULL_EVOLUTION_DIR/*.md files.
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 algorithm should maintain the same interface (function signatures) and include proper error handling."
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-evolve",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "bin": {
5
5
  "claude-evolve": "./bin/claude-evolve",
6
6
  "claude-evolve-main": "./bin/claude-evolve-main",