| Grand Magus |
.
To win the election, Obama has put the nation's computer networks to work,
and breathed into them the stuff of intelligence.
Here is some of his LISP code:
(defun minimax (player board ply eval-fn)
"Find the best move, for PLAYER, according to EVAL-FN,
searching PLY levels deep and backing up values."
(if (= ply 0)
(funcall eval-fn player board)
(let ((moves (legal-moves player board)))
(if (null moves)
(if (any-legal-move? (opponent player) board)
(- (minimax (opponent player) board
(- ply 1) eval-fn))
(final-value player board))
(let ((best-move nil)
(best-val nil))
(dolist (move moves)
(let* ((board2 (make-move move player
(copy-board board)))
(val (- (minimax
(opponent player) board2
(- ply 1) eval-fn))))
(when (or (null best-val)
(> val best-val))
(setf best-val val)
(setf best-move move))))
(values best-val best-move))))))
.
| Terquem |
you know that time, that time when you are walking down the street, it is usually early, like before lunch, and it seems like a nice day, and you see a man (or woman) coming toward you on the street and it looks like that person is engaged in a serious conversation with themself, and you, for a moment, think it might be sort of kind to approach that person and ask, "Hey, buddy, is everything alright?"
It is at that time that you should remind yourself that talking to strangers is, often, unwise.
LazarX
|
IF what the OP suggested was true, he'd get the Slashdot vote.
Unless of course he'd committed the unpardonable sin of doing that programming on a Windows machine... or a Mac.
The Slashdotterati used to peg Redmond as their personal Anti-Christ. With Apple's rising success though, most of it seems to have transferred to Cuppertino.
Sara Marie
|
| 1 person marked this as a favorite. |
you know that time, that time when you are walking down the street, it is usually early, like before lunch, and it seems like a nice day, and you see a man (or woman) coming toward you on the street and it looks like that person is engaged in a serious conversation with themself, and you, for a moment, think it might be sort of kind to approach that person and ask, "Hey, buddy, is everything alright?"
It is at that time that you should remind yourself that talking to strangers is, often, unwise.
Then you pass them and realize they are just talking on a phone using a bluetooth ear clip headphone thing...
| Grand Magus |
Is there supposed to be some meaning to that gibberish?
.
Hurray for Public School !!
.
I'll just leave >this< here.