Skip to content

Commit

Permalink
removed obs_weight (#11)
Browse files Browse the repository at this point in the history
* removed obs_weight

* changed obs_weight in README
  • Loading branch information
zsunberg authored May 27, 2018
1 parent 1549bed commit 1641304
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 60 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ParticleFilters.jl can be be used with or without the [POMDPs.jl](https://github

## Usage without POMDPs.jl

ParticleFilters.jl uses a simple interface consisting of the functions [`generate_s(model, state, control, rng)`](http://juliapomdp.github.io/POMDPs.jl/latest/api/#POMDPs.generate_s) and [`observation(model, control, state)`](http://juliapomdp.github.io/POMDPs.jl/latest/api/#POMDPs.observation) borrowed from [POMDPs.jl](https://github.com/JuliaPOMDP/POMDPs.jl). `generate_s()` should return the next state given the current state and control input; `observation()` should return the observation distribution for a state. If it is difficult to write the observation distribution, the shortcut function `ParticleFilters.obs_weight(model, control, state, observation)` that returns the weight (pdf) for the observation given the state and control can be implemented instead.
ParticleFilters.jl uses a simple interface consisting of the functions [`generate_s(model, state, control, rng)`](http://juliapomdp.github.io/POMDPs.jl/latest/api/#POMDPs.generate_s) and [`observation(model, control, state)`](http://juliapomdp.github.io/POMDPs.jl/latest/api/#POMDPs.observation) borrowed from [POMDPs.jl](https://github.com/JuliaPOMDP/POMDPs.jl). `generate_s()` should return the next state given the current state and control input; `observation()` should return the observation distribution for a state. If it is difficult to write the observation distribution, the shortcut function `POMDPToolbox.obs_weight(model, control, state, observation)` that returns the weight (pdf) for the observation given the state and control can be implemented instead.

Once these two functions have been implemented to define the system dynamics and observation model, the function `update(filter, b, a, o)` can then be used to carry out a single update of the particle filter. It will return a `ParticleCollection` representing the belief at the next time step.

Expand Down
2 changes: 1 addition & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
julia 0.6
StatsBase
POMDPs 0.6
POMDPToolbox 0.2.6 0.2.7
POMDPToolbox 0.2.7
11 changes: 1 addition & 10 deletions src/ParticleFilters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import POMDPs: sampletype
import Base: rand, mean

using POMDPToolbox
import POMDPToolbox: obs_weight
using StatsBase

export
Expand Down Expand Up @@ -123,15 +124,6 @@ Return particle i.
"""
function particle end

"""
obs_weight(pomdp, sp, o)
obs_weight(pomdp, a, sp, o)
obs_weight(pomdp, s, a, sp, o)
Return a weight proportional to the likelihood of receiving observation o from state sp (and a and s if they are present).
"""
function obs_weight end # implemented in obs_weight

### Basic Particle Filter ###
# implements the POMDPs.jl Updater interface
# see updater.jl for implementations
Expand Down Expand Up @@ -222,7 +214,6 @@ include("unweighted.jl")
include("beliefs.jl")
include("updater.jl")
include("resamplers.jl")
include("obs_weight.jl")
include("policies.jl")

end # module
48 changes: 0 additions & 48 deletions src/obs_weight.jl

This file was deleted.

0 comments on commit 1641304

Please sign in to comment.