Code Monkey home page Code Monkey logo

emergent's People

Contributors

psichix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

emergent's Issues

What’s the plan here?

Were you planning to base this project on some specific prior art? I’m designing emergent game features as well so I’m very curious to know more about your intention here.

Add `Reasoner::currenttask()`

I'm trying to integrate with Bevy. It doesn't seem like the existing task system will work as implemented, both because I can't access queries/commands in tasks but also because tasks don't behave like systems. Right now I have an update system that adds current_state() as a component, and each of my task systems checks the reasoner's state before running.

What I'd rather do instead is treat Task implementations as marker components. So instead of the reasoner running the task implementation, it'd simply expose its current task via a current_task() getter. I could then add the empty struct, then my task systems could use With constraints to only run when the specified component is added.

machinery not send or sync

Hello,

Great library, and thank you for such good documentation.

I have question though: why is machinery not send or sync? It was strange to me to discover this was not so.

This causes problems if user stores the machinery as component in for example, specs.

Thank you!

Add `From`/`Into` impls to reduce nesting

Right now my reasoner creation looks like:

        let reasoner = ReasonerBuilder::default()
            .state(State::Idle, ReasonerState::new(0.001, Idle))
            .state(
                State::Investigate,
                ReasonerState::new(
                    ConditionConsideration::unit(ClosureCondition::new(|p: &Perception| {
                        p.heard_kill.is_some() || p.player_coords.is_some()
                    })),
                    Investigate,
                ),
            )
            .state(
                State::Attack,
                ReasonerState::new(
                    ConditionConsideration::unit(ClosureCondition::new(|p: &Perception| {
                        p.sees_player
                    })),
                    Attack,
                ),
            )
            .state(
                State::Dodge,
                ReasonerState::new(
                    ConditionConsideration::unit(ClosureCondition::new(|p: &Perception| {
                        p.sees_player && p.in_gunsight
                    })),
                    Dodge,
                ),
            )
            .build();

I think it would make sense to have a few conversions, so something like this might work:

        let reasoner = ReasonerBuilder::default()
            .state(State::Idle, ReasonerState::new(0.001, Idle))
            .state(
                State::Investigate,
                ReasonerState::new((|p: &Perception| p.heard_kill.is_some()).into(), Investigate)

Where |v: &M| -> bool can convert directly to a consideration. Might make sense to do something similar for ClosureConsideration as well.

Yes, ideally these would be separate traits/functions, but for now it's simplest to locate this with the reasoner creation.

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.