Skip to content

Commit

Permalink
Merge pull request #5 from JuliaPOMDP/pomdptools_ci_updates
Browse files Browse the repository at this point in the history
POMDPTools, Graphs, and CI Updates
  • Loading branch information
dylan-asmar authored Dec 20, 2023
2 parents 26f7aa6 + 0c75517 commit 9649045
Show file tree
Hide file tree
Showing 13 changed files with 108 additions and 203 deletions.
38 changes: 33 additions & 5 deletions .github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,42 @@ on:
schedule:
- cron: 0 0 * * *
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
CompatHelper:
runs-on: ubuntu-latest
steps:
- name: Pkg.add("CompatHelper")
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
- name: CompatHelper.main()
- name: Check if Julia is already available in the PATH
id: julia_in_path
run: which julia
continue-on-error: true
- name: Install Julia, but only if it is not already available in the PATH
uses: julia-actions/setup-julia@v1
with:
version: '1'
arch: ${{ runner.arch }}
if: steps.julia_in_path.outcome != 'success'
- name: "Add the General registry via Git"
run: |
import Pkg
ENV["JULIA_PKG_SERVER"] = ""
Pkg.Registry.add("General")
shell: julia --color=yes {0}
- name: "Install CompatHelper"
run: |
import Pkg
name = "CompatHelper"
uuid = "aa819f21-2bde-4658-8897-bab36330d9b7"
version = "3"
Pkg.add(; name, uuid, version)
shell: julia --color=yes {0}
- name: "Run CompatHelper"
run: |
import CompatHelper
CompatHelper.main()
shell: julia --color=yes {0}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
run: julia -e 'using CompatHelper; CompatHelper.main()'
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
23 changes: 23 additions & 0 deletions .github/workflows/Documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Documentation

on:
push:
branches:
- master
tags: [v*]
pull_request:

jobs:
build:
permissions:
contents: write
statuses: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-docdeploy@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
53 changes: 11 additions & 42 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name: CI
on:
- push
- pull_request
push:
branches:
- master
tags: '*'
pull_request:
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
Expand All @@ -10,58 +13,24 @@ jobs:
fail-fast: false
matrix:
version:
- '1.5'
- 'nightly'
- "1"
- "1.6"
os:
- ubuntu-latest
- macOS-latest
- windows-latest
arch:
- x64
exclude:
- os: macOS-latest
arch: x86
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v1
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
with:
file: lcov.info
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
- uses: codecov/codecov-action@v3
with:
version: '1'
- run: |
julia --project=docs -e '
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()'
- run: |
julia --project=docs -e '
using Documenter: doctest
using FactoredValueMCTS
doctest(FactoredValueMCTS)'
- run: julia --project=docs docs/make.jl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
files: lcov.info
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
*.jl.*.cov
*.jl.cov
*.jl.mem
/Manifest.toml
/docs/build/
Manifest.toml
docs/build/
docs/Manifest.toml
.vscode
26 changes: 11 additions & 15 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,37 +1,33 @@
name = "FactoredValueMCTS"
uuid = "c016a6d7-1193-47d7-896a-d9f14d6b4b26"
authors = ["Stanford Intelligent Systems Laboratory"]
version = "0.1.0"
version = "0.2.0"

[deps]
BeliefUpdaters = "8bb6e9a1-7d73-552c-a44a-e5dc5634aac4"
LightGraphs = "093fc24a-ae57-5d10-9952-331d41423f4d"
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MCTS = "e12ccd36-dcad-5f33-8774-9175229e7b33"
MultiAgentPOMDPs = "9ac5fd70-7902-42e7-9745-ff446b44e779"
POMDPLinter = "f3bd98c0-eb40-45e2-9eb1-f2763262d755"
POMDPModelTools = "08074719-1b2a-587c-a292-00f91cc44415"
POMDPPolicies = "182e52fb-cfd0-5e46-8c26-fd0667c990f4"
POMDPSimulators = "e0d0a172-29c6-5d4e-96d0-f262df5d01fd"
POMDPTools = "7588e00f-9cae-40de-98dc-e0c70c48cdd7"
POMDPs = "a93abf59-7444-517b-a68a-c42f96afdd7d"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"

[compat]
julia = "1.5"
Graphs = "1.5"
MCTS = "0.5"
MultiAgentPOMDPs = "0.1"
POMDPs = "0.9"
POMDPLinter = "0.1"
POMDPModelTools = "0.3"
POMDPSimulators = "0.3"
POMDPPolicies = "0.3,0.4"
LightGraphs = "1.3"
POMDPTools = "0.1"
POMDPs = "0.9"
StaticArrays = "1.0"
MCTS = "0.4"
BeliefUpdaters = "0.2"
julia = "1.6"

[extras]
MultiAgentSysAdmin = "a4538d8c-5052-4f30-aec9-286910cf67a1"
MultiUAVDelivery = "13c59af0-a5df-4589-8a68-75dc1bf2d35a"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]
test = ["Test", "MultiAgentSysAdmin", "MultiUAVDelivery"]
22 changes: 16 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# FactoredValueMCTS

[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://JuliaPOMDP.github.io/FactoredValueMCTS.jl/stable)
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://JuliaPOMDP.github.io/FactoredValueMCTS.jl/dev)
[![Build Status](https://github.com/JuliaPOMDP/FactoredValueMCTS.jl/workflows/CI/badge.svg)](https://github.com/JuliaPOMDP/FactoredValueMCTS.jl/actions)
[![Coverage](https://codecov.io/gh/JuliaPOMDP/FactoredValueMCTS.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/JuliaPOMDP/FactoredValueMCTS.jl)
[![CI](https://github.com/JuliaPOMDP/FactoredValueMCTS.jl/actions/workflows/ci.yml/badge.svg)](https://github.com/JuliaPOMDP/FactoredValueMCTS.jl/actions/workflows/ci.yml)
[![codecov.io](http://codecov.io/github/JuliaPOMDP/FactoredValueMCTS.jl/coverage.svg?branch=master)](http://codecov.io/github/JuliaPOMDP/FactoredValueMCTS.jl?branch=master)
[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://juliapomdp.github.io/FactoredValueMCTS.jl/stable)
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://juliapomdp.github.io/FactoredValueMCTS.jl/dev)

This package implements the Monte Carlo Tree Search (MCTS) planning algorithm for Multi-Agent MDPs. The algorithm factorizes the true action value function, based on the locality of interactions between agents that is encoded with a Coordination Graph. We implement two schemes for coordinating the actions for the team of agents during the MCTS computations. The first is the iterative message-passing MaxPlus, while the second is the exact Variable Elimination. We thus get two different Factored Value MCTS algorithms, FV-MCTS-MaxPlus and FV-MCTS-VarEl respectively.

Expand All @@ -13,7 +13,17 @@ To use our solver, the domain must implement the interface from [MultiAgentPOMDP

## Installation

In the Julia REPL, just do:
```julia
] add FactoredValueMCTS
using Pkg
Pkg.add("FactoredValueMCTS")
```
## Citation

```
@inproceedings{choudhury2021scalable,
title={Scalable Anytime Planning for Multi-Agent {MDP}s},
author={Shushman Choudhury and Jayesh K Gupta and Peter Morales and Mykel J Kochenderfer},
booktitle={International Conference on Autonomous Agents and MultiAgent Systems},
year={2021}
}
```
104 changes: 0 additions & 104 deletions docs/Manifest.toml

This file was deleted.

16 changes: 4 additions & 12 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,12 @@ using FactoredValueMCTS
using Documenter

makedocs(;
modules=[FactoredValueMCTS],
sitename="FactoredValueMCTS.jl",
authors="Stanford Intelligent Systems Laboratory",
repo="https://github.com/JuliaPOMDP/FactoredValueMCTS.jl/blob/{commit}{path}#L{line}",
sitename="FactoredValueMCTS.jl",
format=Documenter.HTML(;
prettyurls=get(ENV, "CI", "false") == "true",
canonical="https://JuliaPOMDP.github.io/FactoredValueMCTS.jl",
assets=String[],
),
pages=[
"Home" => "index.md",
],
modules=[FactoredValueMCTS],
format=Documenter.HTML()
)

deploydocs(;
repo="github.com/JuliaPOMDP/FactoredValueMCTS.jl",
repo="github.com/JuliaPOMDP/FactoredValueMCTS.jl"
)
9 changes: 2 additions & 7 deletions src/FactoredValueMCTS.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,13 @@ using Random
using LinearAlgebra

using POMDPs
using POMDPTools
using MultiAgentPOMDPs
using POMDPPolicies
using POMDPLinter: @req, @subreq, @POMDP_require
using MCTS
using LightGraphs
using BeliefUpdaters

using Graphs
using MCTS: convert_estimator
import POMDPModelTools

using POMDPSimulators: RolloutSimulator
import POMDPs

# Patch simulate to support vector of rewards
function POMDPs.simulate(sim::RolloutSimulator, mdp::JointMDP, policy::Policy, initialstate::S) where {S}
Expand Down
Loading

2 comments on commit 9649045

@dylan-asmar
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/97499

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.2.0 -m "<description of version>" 9649045d283abab509da209eb3d881cc743d674f
git push origin v0.2.0

Please sign in to comment.