#[ blue = "#911e5c" # now burnt sienna / maroon blue1 = "#913e7c" # now burnt sienna white = "#fff" black = "#000" gray = "#ddd" yellow = "#ff3" maxwidth = 55 cloudbackground = offwhite = "#f0ffff" lightblue = "#c8f0ff" cream = "#efeee4" home = "http://aima.cs.berkeley.edu" def a(url, anchortext, tip='', src=None): "Anchor text and link" if src == url: return anchortext # No link if src page is same as url linked to. elif tip: return '%s' % (url, tip, anchortext) else: return '%s' % (url, anchortext) def right (text): return '
%s
' % text def hilite(): return '' % yellow def _hilite(): return '' def nbsp(n=1): return n * " " search = '''
''' logo = '' coverUS = ''' ''' coverGL = ''' ''' menu = '\n
  • '.join([ a('index.html', '⌂ US Edition'), a('global-index.html', '⌂ Global Edition'), a('ack.html', 'Acknowledgements'), a('https://github.com/aimacode', 'Code'), a('adoptions.html', 'Courses'), a('translations.html', 'Editions'), a('errata.html', 'Errata'), a('https://aimacode.github.io/aima-exercises/', 'Exercises'), a('%sfigures.pdf', 'Figures'), a('instructors.html', 'Instructors Page'), a('%salgorithms.pdf', 'Pseudocode'), a('comments.html', 'Reviews'), ]) def leftright(left, right): "Align some text to left and some to right." return '
    %s%s
    ' % (left, right) def header(title, head='', ed=''): """The title at the top of the page, and the left navigation menu. Use head= to add anything to the header; use ed='global-' for global edition.""" cover = coverGL if ed == 'global-' else coverUS return (""" %s %s
    %s
    • %s

    %s

    %s

    \n""") % (title, head, search, (menu % (ed, ed)), cover, title) ## leaves content div open yaptu_filename = "" def ch(num, name=''): return (' ' * (6-len(str(num)))) + str(num) + name def b(text): return '' + text + '' def i(text): return '' + text + '' def sc(text): return '' + text + '' analytics = """ """ unused = """ """ def footer(src=None, files=[]): import os, time try: t = time.localtime(os.stat(yaptu_filename)[8]) for f in files: ## Consider all files this file depends on t = max(t, time.localtime(os.stat(f)[8])) except OSError: t = time.localtime() modified = "Modified: " + time.strftime("%b %d, %Y", t) return ('

    %s' % (leftright(a(home, "⌂ AI: A Modern Approach", src=src), modified), analytics)) def fieldsplit(sep, lines): if isinstance(lines, str): lines = lines.strip().split('\n') return [[f.strip() for f in line.split(sep)] for line in lines] #### below "padding: 1em 0em 1em .5em;" means top right bottom left #] BODY { background:<> } STRONG {color:<> font-family:"sans-serif" font-size:80%} HR, H1, H2, H3 { color:<> } H1 { font-size:200%; line-height:140% } TABLE { valign:top; cellspacing:0; cellpadding:0 } input.search{ background-color:<>; color:black; } .bluebox, .bluebox TD, .bluebox TR {color:<>; cellpadding:2; border: solid <>} .bluebox TD { color:<>; cellpadding:4} .side, .side TD { color:<>; white-space:nowrap; font-size:80% background-color:#ccffcc; border:solid thin <>; cellpadding:4} .big {font-size:200%;} .tagcloud { color: <>; padding: 3px; text-align: center; text-decoration: none} .tagcloud:link { color: <>; } .tagcloud:visited { color: <>; } .tagcloud:hover { color: <>; background: <>; } .tagcloud:active { color: <>; background: <>; } #container { width: 100%; margin: 1px auto; background-color: <>; color: #333; border: 1px solid white; line-height: 130%; } #top { padding: .2em 0em .2em .5em; margin-left: 150px; margin-top: .45em; margin-right: .45em; background-color: <>; border: 0px solid gray; min-width: 20em; max-width: <>em; } #top h1 { padding: 0; margin: 0; } #leftnav { float: left; width: 140px; margin: 0; padding: .4em; } #content { margin-left: 150px; margin-right: 0px; padding: .5em; min-width: 20em; max-width: <>em; } #footer { clear: both; margin: 0; padding: .7em; margin: .45em; color: #333; background-color: <>; border: 0px solid gray; min-width: <<20+9>>em; max-width: <>em; } #leftnav p { margin: 0 0 .3em 0; } #content h222 { margin: 0 0 .1em 0; } /*Credits: Dynamic Drive CSS Library */ /*URL: http://www.dynamicdrive.com/style/ */ #blueblock{ width: 134px; border-right: 1px solid #000; padding: 0 0 0em 0; font-family: 'Trebuchet MS', 'Lucida Grande', Arial, sans-serif; font-size: 90%; background-color: <>; color: #333; } #blueblock ul{list-style: none; margin: 0; padding: 0; border: none; } #blueblock li {border-bottom: 1px solid <>; margin: 0; } #blueblock li a{display: block; padding: 5px 5px 5px 8px; border-left: 10px solid <>; background-color: <>; color: <>; text-decoration: none; width: 100%; } #blueblock li a{ width: auto; } #blueblock li a:hover{ border-left: 10px solid <>; background-color: <>; color: <>; }