Giter Club home page Giter Club logo

Comments (3)

clarkaelliott avatar clarkaelliott commented on June 14, 2024

I'd imagine a cooldown only to prevent stacking behaviors in a single tick would be enough to begin testing with? We don't want unresponsive entities, but at the same time we don't want confused ones! There has to be a nice middle ground somewhere.

Also, I had no idea you were so active on this project! Unfortunately I am spread thin at this time, focused on still learning Java fundamentals, I am working my way through my textbooks very thoroughly and building those projects & the same with Android SDK each day.

In short, I currently will only have maybe 5-10 hours a week to look into this project, it will primarily be a learning experience for me, in both game development and the Java language! Thank you for inviting me in, and sharing all these communications with me, sorry I cannot provide more help at this time, but I am working on it each day 👍

from alone-rl.

fabio-t avatar fabio-t commented on June 14, 2024

I open issues for myself really, so I don't get too distracted at work (I brain-dump stuff here and forget it, then come back to it at night).

You are free to look around, play with things etc, as github allows - you would be working on your forked version, not on my repository :) so you can do/undo as you wish, for learning.

from alone-rl.

fabio-t avatar fabio-t commented on June 14, 2024

Regarding your question:

I'd imagine a cooldown only to prevent stacking behaviors in a single tick would be enough to begin testing with? We don't want unresponsive entities, but at the same time we don't want confused ones! There has to be a nice middle ground somewhere.

There is always a single active behaviour at any time, never more. The tick is also flexible, by entity. So, say entity 1 is grazing peacefully on the grass, and a predator arrives. At the next AI tick for entity 1, we'd evaluate all behaviours: FleeBehaviour would spot a predator and probably be selected and executed. That means that entity 1 would be assigned a MoveTo component to be processed by the MovementSystem at the right time.

However, it may happen that the predator stays far away, and entity 1 Hunger at the next tick is grown enough that it "wins" against the FleeBehaviour. So we switch to GrazeBehaviour again. Then the predator comes nearer, and we switch to FleeBehaviour again, moving a single cell.

This might be ok, but in general I find it non optimal. I think when you enter "FleeBehaviour" you should move at least 2-3 cells away from the predator before even looking if you are hungry or if your group is far away (that would be FlockingBehaviour).

Kind of an "adrenaline rush": if you are in a dangerous situation you focus on fleeing, even if the predator has actually stayed behind (maybe it's tired/hurt, or maybe it's chasing another prey).

It shouldn't actually be needed, this cooldown, if the utility functions of all behaviours are well coordinated. But it's hard to check if they are.

from alone-rl.

Related Issues (20)

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.