mlb2251 / stitch

A scalable abstraction learning library
MIT License
74 stars 8 forks source link

Tracking Issue: Top Down Search #79

Closed mlb2251 closed 2 years ago

mlb2251 commented 2 years ago

Summary

Visual

Comparison to old approach

Upper bounding

Multiuse bounds

Calculating subsets

Search order

Entropy in Search Order

Preliminary tests on multiarg upper bound weakening

Multiuse Ideas

Open Qs:

mlb2251 commented 2 years ago

Top down search idea V2: arity-free

Proposal: remove the "multiarg/multiuse" move from expansion so instead at each step we choose a hole and case-split it on whether it's an App (of 2 new holes) a Lam (of a hole) or a Prim/Var (in which case we case-split on the exact value). This splits the space into disjoint subsets of usage locations. Note that splitting on the exact value of a Prim/Var is the same as the idea of building out the body of an invention (without this we would just be looking at the app/lam structure). The splitting is safe and still enumerates all possible programs because case-splits are safe in general: you produce the set of all possible cases for a given hole, so you don't lose anything.

Also, at each step we would take a pattern with a frontier of holes and fully do multiarg/multiuse/refinement in the moment to get a bunch of finished inventions.

Why is it better to do multiarg/multiuse/refinement at the end?

Approaches to concretizing at the end:

mlb2251 commented 2 years ago

Top down search idea V3: argchoices

This builds on the previous two ideas. We will be first doing a largely arity-blind search for patterns with frontiers of holes, but with a few differences:

Key ideas

Overall algorithm

mlb2251 commented 2 years ago

implemented in #92 with great success wahoo