nardil prob. toy model. odkril problem ne-pickanja itemov
parent
f5a7dea251
commit
ca342a20a3
40
test.py
40
test.py
|
@ -1,10 +1,5 @@
|
|||
# item
|
||||
## struktura
|
||||
from random import randint
|
||||
|
||||
|
||||
title, due, interval = 2, 3, 4
|
||||
|
||||
# item
|
||||
#collection
|
||||
clltn = []
|
||||
|
||||
|
@ -22,12 +17,11 @@ def generate_clltn (n_of_cards):
|
|||
return clltn
|
||||
|
||||
# USER
|
||||
deck_size = 20
|
||||
deck_size = 10
|
||||
user_clltn = generate_clltn(100)
|
||||
max_new = 5
|
||||
|
||||
print(user_clltn)
|
||||
|
||||
# generate deck
|
||||
def get_new(user_clltn, n_of_cards):
|
||||
for card in user_clltn:
|
||||
pass
|
||||
|
@ -42,10 +36,34 @@ def generate_deck(user_clltn, max_new, deck_size):
|
|||
#1 SR - super-memo style
|
||||
|
||||
#2 Probabilistic
|
||||
## problem je, da pri probabilističnem težko nardiš, da pač en dan ni nič v decku...
|
||||
|
||||
|
||||
interest_rate_def = 0.5
|
||||
|
||||
def prob_eval(card):
|
||||
title, due, interval = card #due je tukaj interest rate
|
||||
|
||||
print("intrest rate je: ", due)
|
||||
gumb = input("A te " + title + " zanima?")
|
||||
if gumb == "y":
|
||||
due = 0.99
|
||||
elif gumb == "m":
|
||||
due = abs(due / 1.3)
|
||||
else:
|
||||
due = abs(due / 2)
|
||||
|
||||
card_mod = title, due, interval
|
||||
return card_mod
|
||||
|
||||
# engine
|
||||
current_deck = []
|
||||
|
||||
deck = []
|
||||
for c in range(deck_size):
|
||||
deck.append(user_clltn[c])
|
||||
print(deck)
|
||||
deck_mod = []
|
||||
for c in deck:
|
||||
c = prob_eval(c)
|
||||
deck_mod.append(c)
|
||||
|
||||
print(deck_mod)
|
||||
|
|
Loading…
Reference in New Issue