repo.or.cz
/
Projects.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Initial Commit
[Projects.git]
/
ai
/
numbers.py
blob
106ddd5bbef4d518803c58cb512259225d64de87
1
#!/usr/bin/env python
2
3
from
ai
import
ai
4
import
grammar
5
import
random
6
7
player
=
ai
(
"profile1"
,
grammar
)
8
9
#a=random.randint(1, 100)
10
11
a
=
13
12
13
while True
:
14
o
=
player
.
output
()
15
if
o
==
c
:
16
player
.
input
(
grammar
.
good
)
17
elif
o
>
a
:
18
player
.
input
(
">"
)
19
elif
o
<
a
:
20
player
.
input
(
"<"
)