Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documentation of StochasticSearchIteartor functions #88

Open
nicolaefilat opened this issue May 3, 2024 · 0 comments
Open

Update documentation of StochasticSearchIteartor functions #88

nicolaefilat opened this issue May 3, 2024 · 0 comments

Comments

@nicolaefilat
Copy link
Contributor

 Proposes a list of programs using the location provided by `neighbourhood` and the `dict`.
   
     propose(iter::T, current_program::RuleNode, neighbourhood_node_loc::NodeLoc, dmap::AbstractVector{Int}, dict::Union{Nothing,Dict{String,Any}}) where T <: StochasticSearchIterator -> Iter[RuleNode]
 ----

 Based on the current program and possible cost and temperature it accepts the program or not. Usually we would always want to accept
 better programs but we might get stuck if we do so. That is why some implementations of the `accept` function accept with a probability 
 costs that are worse. 
 `cost` means how different are the outcomes of the program compared to the correct outcomes.
 The lower the `cost` the better the program performs on the examples. The `cost` is provided by the `cost_function`

    accept(::T, current_cost::Real, next_cost::Real, temperature::Real) where T <: StochasticSearchIterator -> Bool
 ----
 Returns the new temperature based on the previous temperature. Higher the `temperature` means that the algorithm will explore more.
   
    temperature(::T, current_temperature::Real) where T <: StochasticSearchIterator -> Real
 ---
 Returns the cost of the current program. It receives a list of tuples `(expected, found)` and gives back a cost.
   
     cost_function(outcomes::Tuple{<:Number,<:Number}[]) -> Real

 ----
 # Fields

This function signatures no longer match the actual implementation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant