[rfk-dev] robotfindskitten 2.0 - New port of rfk to jQuery + hello to rfk-devs!

David Griffith dgriffi at cs.csubak.edu
Wed Sep 14 18:16:42 PDT 2011


On Wed, 14 Sep 2011, Star Simpson wrote:

> On Wed, 14 Sep 2011, David Griffith wrote:
>
>> On Wed, 14 Sep 2011, Leonard Richardson wrote:
>> 
>>>>> Also, does the original rfk do anything to prevent landlocked NKIs?
>>> 
>>> I can definitively say that it does not.
>> 
>> How hard would it be to implement?

> In jQuery, a little annoying - I keep track of occupied cells (as I think all 
> rfks probably have to), so you'd be doing a bunch of array consulting.
>
> Seth Schoen showed me the old nethack commands to move diagonally only last 
> night (implemented hjkl navigation) so I'll add in the ybun movements and 
> that should take care of a lot of the issues with landlocked cells.

In the interest of conserving memory, consider this:
Randomly distribute the NKIs and kitten, then check each cell to see if 
they have more than n "live" partners.  If there are too many, kill random 
partners until we're at n.  Cells that die would be distributed again, 
then check again.  Repeat until no more cell deaths.  This would still 
allow a cell to be locked up in a large area, but I've noticed that such 
an event is exceedingly rare.  It's more common for a single live cell to 
have all its partners live.  Even then, when I run a game of 589 (maximum 
for Inform), I only rarely find a landlocked cell.

Any other ideas?

-- 
David Griffith
dgriffi at cs.csubak.edu

A: Because it fouls the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?


More information about the rfk-dev mailing list