isibboi / agentsim Goto Github PK
View Code? Open in Web Editor NEWSimulates a swarm of goblins in a cave
License: MIT License
Simulates a swarm of goblins in a cave
License: MIT License
Goblins should walk back to spawn if their food is low.
Goblins should not work in tasks that are too long to finish without starving.
Make the viewport changeable to allow zooming and limit the players viewport at the start.
Seems like some entity is returning null for getBounds()
The window should be opened at the position it was closed last time.
Make command output differentiable from echo output.
A planned task is the desire to do something, while a task is the technical realisation of doing something.
A planned task is a meta goal, like walk home, or get food, while a task is an algorithm for doing such thing from a specific state, like walk from P to Q.
Thus, a planned task has for example a priority and lives longer, while a task just lives while it is executed. Hence, it doesn't need a priority.
Maybe there is a better wording than task and planned task.
Commit 28536ca
12:11:15.165 [main] INFO de.isibboi.agentsim.Settings - Settings loaded
12:11:15.368 [main] INFO de.isibboi.agentsim.ui.DrawFrame - Page flipping supported: true
12:11:15.368 [main] INFO de.isibboi.agentsim.ui.DrawFrame - Requires full screen for page flipping: false
12:11:15.501 [main] INFO de.isibboi.agentsim.game.MultiThreadedEntityCollider - Entity collider threads started
12:11:15.565 [main] INFO de.isibboi.agentsim.game.Game - Game started
12:11:15.634 [main] TRACE de.isibboi.agentsim.game.entities.ai.tasks.MoveToTask - Could not find a valid path.
Exception in thread "main" java.lang.NullPointerException
at de.isibboi.agentsim.game.entities.ai.tasks.MoveToTask.isFinished(MoveToTask.java:72)
at de.isibboi.agentsim.game.entities.ai.TaskExecutingAI.update(TaskExecutingAI.java:56)
at de.isibboi.agentsim.game.entities.ai.TaskExecutingAI.startNextTask(TaskExecutingAI.java:118)
at de.isibboi.agentsim.game.entities.ai.TaskExecutingAI.update(TaskExecutingAI.java:62)
at de.isibboi.agentsim.game.entities.ai.TaskExecutingAI.startNextTask(TaskExecutingAI.java:132)
at de.isibboi.agentsim.game.entities.ai.TaskExecutingAI.update(TaskExecutingAI.java:62)
at de.isibboi.agentsim.game.entities.Goblin.update(Goblin.java:72)
at de.isibboi.agentsim.game.entities.Entities.update(Entities.java:119)
at de.isibboi.agentsim.game.Game.update(Game.java:50)
at de.isibboi.agentsim.ui.AgentFrame.update(AgentFrame.java:110)
at de.isibboi.agentsim.AgentSim.run(AgentSim.java:58)
at de.isibboi.agentsim.AgentSim.main(AgentSim.java:25)
When an entity is selected, its planned path should be drawn.
Their internal position is not updated, but the movement smoothing continues to work.
The movement smoothing should be paused, too.
Tasks are enqueued by the played and executed like this:
Materials should not be managed by the environment class. They should be a non-global object.
This allows to embed the application on a website.
Should be done as soon as possible, as it will become harder the later it is done.
Exception in thread "main" java.lang.NullPointerException
at de.isibboi.agentsim.game.entities.ai.intends.AbstractIntend.searchAccessPoint(AbstractIntend.java:46)
at de.isibboi.agentsim.game.entities.ai.intends.MiningIntend.execute(MiningIntend.java:43)
at de.isibboi.agentsim.game.entities.ai.GoblinSwarmAI.selectNextTask(GoblinSwarmAI.java:203)
at de.isibboi.agentsim.game.entities.ai.GoblinSwarmAI.eventExecutingIdleTask(GoblinSwarmAI.java:191)
at de.isibboi.agentsim.game.entities.ai.TaskExecutingAI.startNextTask(TaskExecutingAI.java:125)
at de.isibboi.agentsim.game.entities.ai.TaskExecutingAI.update(TaskExecutingAI.java:62)
at de.isibboi.agentsim.game.entities.ai.TaskExecutingAI.finishTask(TaskExecutingAI.java:84)
at de.isibboi.agentsim.game.entities.ai.TaskExecutingAI.update(TaskExecutingAI.java:57)
at de.isibboi.agentsim.game.entities.Goblin.update(Goblin.java:72)
at de.isibboi.agentsim.game.entities.Entities.update(Entities.java:119)
at de.isibboi.agentsim.game.Game.update(Game.java:50)
at de.isibboi.agentsim.ui.AgentFrame.update(AgentFrame.java:110)
at de.isibboi.agentsim.AgentSim.run(AgentSim.java:56)
at de.isibboi.agentsim.AgentSim.main(AgentSim.java:23)
The base for the swarm, should, as of now, be an endless source for food.
In cea78ff, when reaching about 1200 entities, the frame rate drops to the bottom.
Steps:
Entities might be collided two times at once.
Get info on how to do that.
Add the ability to select an entity and show the user basic data about that entity.
After exiting, the VM keeps running. Probably a thread is not terminated.
When you want to press a button, you have to click above it.
It is not used anyways.
And use that directory for all IO
Drawables with a higher priority should be drawn later on, so that they are more visible.
The update should be executed in the next update phase.
The task ai is currently bad, it should not be combined with the scheduling method. Maybe remove the queue from the task AI, and let the goblin ai decide what to execute next. For queueing, there is the composite task.
Maybe goblins should forget what they know from time to time.
This could lead to specializations. Or just destroy everything.
Was tested in the ATIS. Game seems to shutdown correctly, but the JVM keeps running.
The game was started with the run.sh script.
The game will be played at a much lower update rate than now, to allow the player to understand what happens. This makes it necessary to animate movement, so that the player cab easily follow one entity.
Exchanging knowledge is slowing the game down. This should not be the case.
Currently, entities can walk past each other, if they are right next to each other, and then switch positions. Should a collision happen in this case?
The window has a white border on the left and bottom.
Currently, anyone can unlock any location. When unlocking a location, the caller should pass something to make sure that he locked the location before.
Starvation prevention just uses a heuristic guessing how far the way home could be.
This should be replaced with actual path finding.
Tasks should not change after being started, or, even better, after creation.
This gives the AI more control over what happens, and may solve the starvation problem (#28).
This makes the right 10 pixels not clickable.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.