Event Resolution Framework

T

Terry Michaels

Has anyone ever pursued creating a library/framework for the abstract
management of event resolution models?

I'm coding a game where character actions of all players are planned
ahead of time, and then these actions are executed all at the same time.
This, obviously, means that I will need to develop logic to resolve
event conflicts. For example, character A decides to send a message to
character B, at the same time that character C decides to shoot
character A. So my game logic needs to decide which events take
precedence (does character A get off his message before getting shot?)
and so forth.

I was curious if anyone had every worked on some kind of generic event
management framework that could underlie an actual gaming engine. Anyone
heard of anything like that?
 
A

Andrew Wagner

This sounds interesting. Have you heard of such a library in another languag=
e?=20
 
T

Terry Michaels

Andrew said:
This sounds interesting. Have you heard of such a library in another
language?

No. Google searches bring up nothing. But then, maybe "Event Resolution"
is the wrong terminology(?)
 
A

Andrew Wagner

[Note: parts of this message were removed to make it a legal post.]

So how does the logic decide which event takes priority? And what
abstraction could a library provide for something like this? It almost seems
like you would just need to set up some rules, like "Event F always wins",
"Event K always beats Event D unless some_fact is true", etc.
 
C

Chuck Remes

So how does the logic decide which event takes priority? And what
abstraction could a library provide for something like this? It almost seems
like you would just need to set up some rules, like "Event F always wins",
"Event K always beats Event D unless some_fact is true", etc.

I think you may want to google "rules engine." When I did that, I came up with this hit:

http://rools.rubyforge.org/

cr
 
J

Jesús Gabriel y Galán

So how does the logic decide which event takes priority? And what
abstraction could a library provide for something like this? It almost seems
like you would just need to set up some rules, like "Event F always wins",
"Event K always beats Event D unless some_fact is true", etc.

Maybe a rules engine? I've never used it, but google turns up:

http://rools.rubyforge.org/

Jesus.
 
J

Jesús Gabriel y Galán

So how does the logic decide which event takes priority? And what
abstraction could a library provide for something like this? It almost s= eems
like you would just need to set up some rules, like "Event F always wins= ",
"Event K always beats Event D unless some_fact is true", etc.

I think you may want to google "rules engine." When I did that, I came up= with this hit:

http://rools.rubyforge.org/

Amazing ! We even nearly used the same words :)

Jes=FAs.
 
C

Chuck Remes

=20
On Sep 3, 2010, at 9:41 AM, Andrew Wagner wrote:
=20
So how does the logic decide which event takes priority? And what
abstraction could a library provide for something like this? It = almost seems
like you would just need to set up some rules, like "Event F always = wins",
"Event K always beats Event D unless some_fact is true", etc.
=20
=20
Amazing ! We even nearly used the same words :)

Great minds think alike!

Oh, and further down the list of hits is Ruleby which looks like an =
interesting choice. Plus, it's under active development.

http://github.com/codeaspects/ruleby

cr
 
T

Terry Michaels

Chuck said:
Great minds think alike!

Oh, and further down the list of hits is Ruleby which looks like an
interesting choice. Plus, it's under active development.

http://github.com/codeaspects/ruleby

cr

I think a rules engine might be along the lines of what I was looking
for, though I'm not sure rools or ruleby would be any help. Half the
links at rools.rubyforge.org don't work, including the ones that link to
code examples, so I set that one aside. Ruleby seems to be better
maintained, but to be honest, I still can't quite figure out the API,
even after looking at the docs and examples. Furthermore, the Ruleby
rules conflict resolution system is not clear to me (FIFO more important
that actual given resolution priority...?) so I'm not sure how it would
integrate into what I want to accomplish with my video game.

I'm thinking now it would just be easier to design my own rules system,
though admittedly I don't know anything about advanced node-based
algorithms.
 
J

Jesús Gabriel y Galán

Chuck said:
On Sep 3, 2010, at 9:41 AM, Andrew Wagner wrote:

So how does the logic decide which event takes priority? And what
abstraction could a library provide for something like this? It almos= t seems
like you would just need to set up some rules, like "Event F always w= ins",
"Event K always beats Event D unless some_fact is true", etc.



I think a rules engine might be along the lines of what I was looking
for, though I'm not sure rools or ruleby would be any help. Half the
links at rools.rubyforge.org don't work, including the ones that link to
code examples, so I set that one aside. Ruleby seems to be better
maintained, but to be honest, I still can't quite figure out the API,
even after looking at the docs and examples. Furthermore, the Ruleby
rules conflict resolution system is not clear to me (FIFO more important
that actual given resolution priority...?) so I'm not sure how it would
integrate into what I want to accomplish with my video game.

I'm thinking now it would just be easier to design my own rules system,
though admittedly I don't know anything about advanced node-based
algorithms.

You can get some ideas from:

http://en.wikipedia.org/wiki/Drools
http://en.wikipedia.org/wiki/Rete_algorithm

Good luck, looks like a very interesting project.

Jesus.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,145
Messages
2,570,826
Members
47,372
Latest member
LucretiaFo

Latest Threads

Top