users-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Gnu prolog as rule evaluator for small C virtual-world game.


From: tvetunge
Subject: Gnu prolog as rule evaluator for small C virtual-world game.
Date: Wed, 9 Apr 2003 16:35:16 +0200

Hi.

I've asked this thing before, but got no answer.. I'll try making it brief;

How do I make a program able to interoperate with gnu-prolog as if the program
itself was the user?

I am trying this with C, to make it easier for myself.
I am aware of Pl_Query, the problem is that I do not know in advance 
(compile-time)
which facts will be asserted to prolog.
I am only trying to add new facts runtime, not present new queries.

Example:
During play, it is suddenly decided that due to game-balance, some of the
players should have more money.
So the following new facts should be added to the rule engine:

'credits(player1,1000)'
'credits(player2,1000)'
...
'credits(player100,1000)'

How can I state these facts to prolog runtime?


Regards, 
  Uffe Wassmann.


________________________________________
Få din egen webmail på http://solmail.sol.dk - gratis og med dig overalt!
Træt af virus? Få gratis beskyttelse her: http://antivirus.sol.dk






reply via email to

[Prev in Thread] Current Thread [Next in Thread]