TAEB / TAEB-AI-Behavioral

behavioral AI for TAEB
http://taeb.github.io
5 stars 4 forks source link

Don't always eat the first comestible #13

Closed seankelly closed 11 years ago

seankelly commented 11 years ago

The code has a spot to sort the edible items, but does not do anything:

for my $item (@edible_items) {
    # XXX: avoid eating carrots and other beneficial items
    # XXX: prefer floor food
}
seankelly commented 11 years ago

I'm not sure what the order should be. For me, I would eat the items that gave less nutrition first, saving the foo-rations for later. After that, I would prefer food rations over K/C-rations due to weight. May be able to sort on nutrition/weight and pick the worst one.

sartak commented 11 years ago

Sorting on nutrition/weight and eating the worst one seems like it'd have all the second-order effects you want. :+1: