[spam][ot][crazy] thoughts on practicing hobby ai

Undescribed Horrific Abuse, One Victim & Survivor of Many gmkarl at gmail.com
Sun Aug 27 09:30:12 PDT 2023


def possible_params_for_func(func, params):
    # returns a list of lists, each one possible values that could
meet that param
    # this can be used to convert a list of functions and a list of
available params,
    # into lists the combinations of which are all possible uses of
the functions.
    return [
        [ # all params with matching types
            param
            for param in params
            if isinstance(param, fparam.type) # note: more general if
fparam.type performs this check
        ]
        for fparam in func.params # for all parameters the function takes
    ]

# then a function to combine lists
# note: for large sets, and at higher levels, the system would
prioritize parts of the resulting combination and only use those


More information about the cypherpunks mailing list