comparison src/solver.tp @ 59:3c8d8fdd32a1 default tip

mike's changes to solver
author bill
date Sun, 11 Aug 2013 15:24:22 -0700
parents c50f0fb9a717
children
comparison
equal deleted inserted replaced
58:c50f0fb9a717 59:3c8d8fdd32a1
225 if: numTests <= 0 { 225 if: numTests <= 0 {
226 numTests <- 16 226 numTests <- 16
227 } 227 }
228 trees <- #[] 228 trees <- #[]
229 229
230 if: (args length) > 3 { 230 if: (args length) > 5 {
231 ops <- (args get: 3) splitOn: "," 231 ops <- (args get: 5) splitOn: ","
232 if: size < 10 { 232 if: size < 10 {
233 trees <- prog filterTrees: (prog allOfSize: size) ops 233 trees <- prog filterTrees: (prog allOfSize: size) ops
234 } else: { 234 } else: {
235 print: "Generating programs for operators: " . (ops fold: "" with: :acc el { acc . el }) . "\n" 235 print: "Generating programs for operators: " . (ops fold: "" with: :acc el { acc . el }) . "\n"
236 trees <- prog allOfSize: size withOps: ops 236 trees <- prog allOfSize: size withOps: ops
240 } else: { 240 } else: {
241 trees <- (prog allWithMaxSize: size) 241 trees <- (prog allWithMaxSize: size)
242 } 242 }
243 print: "Running classifier on " . (string: (trees length)) . " programs\n" 243 print: "Running classifier on " . (string: (trees length)) . " programs\n"
244 info <- classify: prog trees numTests 244 info <- classify: prog trees numTests
245 if: (args length) > 5 { 245 if: (args length) > 4 {
246 progId <- (args get: 4) 246 progId <- (args get: 3)
247 authKey <- (args get: 5) 247 authKey <- (args get: 4)
248 248
249 solve: progId withAuth: authKey andInfo: info andProg: prog 249 solve: progId withAuth: authKey andInfo: info andProg: prog
250 } else: { 250 } else: {
251 print: info 251 print: info
252 } 252 }