Skip to content

Commit

Permalink
Merge pull request #39 from FL03/dev-v0.3.0
Browse files Browse the repository at this point in the history
Dev v0.3.0
  • Loading branch information
FL03 authored Dec 29, 2023
2 parents efdedcd + fb689ff commit f27d074
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ members = [
"acme",
"core",
"derive",
"macros",
"macros"
]
resolver = "2"

Expand Down
11 changes: 11 additions & 0 deletions acme/src/agents/agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,14 @@
Appellation: agent <module>
Contrib: FL03 <jo3mccain@icloud.com>
*/
use super::{Architecture, AgentProgram};

pub trait Agent {
type Arch: Architecture;
type Program: AgentProgram;
}


pub struct SimpleAgent {

}
4 changes: 4 additions & 0 deletions acme/src/agents/environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
*/

pub trait Environment {}

pub trait Percept {

}
14 changes: 3 additions & 11 deletions acme/src/agents/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,11 @@ pub enum AgentType {
pub trait Architecture {
type Actuator: Actuator;
type Observer: Observer;
}

pub trait Agent {
type Arch: Architecture;
type Program: AgentProgram;
fn actuators(&self) -> Vec<Box<dyn Actuator>>;
}


pub trait Observer {
type Observation;
type Reward;
Expand Down Expand Up @@ -64,12 +62,6 @@ pub trait AgentFunction {
type Action;
type Env: Environment;
type Params;
type Reward;
type State;

fn agent_fn(
&self,
params: Self::Params,
env: &mut Self::Env,
) -> (Self::Action, Self::Reward, Self::State);
fn compute(&self, params: Self::Params, env: &mut Self::Env) -> Self::Action;
}

0 comments on commit f27d074

Please sign in to comment.