Lab 1 – RED AI Product Description Michael Janda CS411

advertisement
Janda 1
Lab 1 – RED AI Product Description
Michael Janda
CS411
February 27, 2008
Janda 2
Table of Contents
1 Introduction .............................................................................................................................................. 3
2 Product Description .................................................................................................................................. 3
2.1 Key Product Features and Capabilities............................................................................................... 6
2.2 Major Components (Hardware/Software) ......................................................................................... 8
2.3 Target Market / Customer Base ....................................................................................................... 10
3 RED AI Prototype Description ................................................................................................................. 10
3.1 Prototype Functional Objectives ..................................................................................................... 11
3.2 Prototype Architecture (Hardware/Software) ................................................................................. 12
3.3 Innovative Features of Prototype .................................................................................................... 14
3.4 Challenges and Risks ........................................................................................................................ 15
4 Prototype Demonstration Description.................................................................................................... 16
References ................................................................................................................................................... 18
Glossary ...................................................................................................................................................... 19
Table of Figures
Figure 1 Least Common Denominators of Profit (Red Team, 2007).......................................................... 5
Figure 2 Software Major Functional Component Diagram (Red Team, 2007) ........................................... 8
Figure 3. Differences Between the Real Product and the Prototype (Caulkins & Bourque, 2008) ........... 11
Figure 4 Prototype Major Functional Component Diagram (Bourque, 2008) ........................................... 14
Janda 3
1 Introduction
If the American Dream is yet alive, at its heart is the entrepreneurial spirit. Capitalism is
more than an economic model. It is an ethos. The RED AI1 group contends that it can further
the agenda of those who pursue the American Dream as restaurateurs.
Though accurate statistics pertaining to restaurant failure rates are elusive, it has been
estimated that at least half of all restaurants fail within the first three years of their operation.
(RestaurantOwner.Com, 2007) While the reasons for restaurant failure are as varied as the
restaurants themselves, it is self-evident that a more efficiently run restaurant is less likely to fail
than one that is less efficiently run but is equal in all other aspects.
RED AI’s proposed product and namesake, RED AI, is a software package that will
analyze restaurant functioning across the areas of staffing, menu, inventory, and customer flow.
Utilizing data provided it by the user, it will apply a rule-set derived from the expert knowledge
of a restaurant consultant and analyze trends to make suggestions for improved efficiency.
2 Product Description
RED AI is a collection of interacting software components, sold as a package, that can be
installed and operated on any reasonably modern personal computer personal computer running a
Microsoft Windows, Macintosh, or Linux operating system. Though the product will allow for
the automated collection of data at the point of sale, it will also be capable of utilizing any
database the restaurant might already have in place, importing the information contained therein
to an internal database.
1
RED AI owes its etymological roots to the group of individuals formerly known as “the red team” and the nature
of their product, which employs mechanisms analogous to artificial intelligence.
Janda 4
Once the data has been inputted or transferred into the internal database, RED AI
analyzes the data using a predefined set of logical rules and also number crunching techniques.
An example of such a predefined logical rule is, “If there exist more than four times as many
occupied tables as there are waiters on duty at a certain time period, it is recommended that
additional waiters be staffed for this time period.” A simplified example of a number crunching
technique is to compare the wait staff for all weekday breakfast shifts and determine which
weekday breakfast shift yielded the highest gross receipts after wages and, supposing there was
nothing exceptional about customer flow during this breakfast shift, recommend that wait staff
levels for all weekday breakfast shifts be modified to match those for which the gross receipts
after wages was the highest. As mentioned previously, in its final form, the scope of the
product’s suggestions will not be limited to staffing issues, but will act as a veritable panacea for
restaurant inefficiency, seeking it out in all aspects of the business’s operation, suggesting
changes to ameliorate suboptimal restaurant functioning.
Figure 1 displays the subsets of restaurant profit and the areas for improved efficiency
that lie in their overlaps.
[page break]
Janda 5
Figure 1. Least Common Denominators of Profit (Red Team, 2007)
It is the level of staff, the customer flow, the content of the menu, and the inventory on
hand that are responsible for the profitability of the restaurant. The level of staff affects
restaurant profit by the wages paid the staff, the customer flow influences profit by providing the
revenue, the menu sets the framework by which revenue is received, and the restaurant’s profit is
reduced by the level of inventory it keeps on hand. As depicted in figure 1, in the overlaps
between these four profit factors, there are efficiency relationships. The level of staff can be
adjusted to meet the needs of the customer flow, giving rise to service efficiency. Likewise, the
menu can be adjusted to suit the desires of the customer to increase efficiency either by changing
the menu’s contents or adjusting prices. Inventory efficiency is the maximized when the level of
inventory on hand reaches the minimal level to meet the demands of the customers. This optimal
level of efficiency can be reached either by modifying the menu or changing ordering practices.
It is in these three arenas of efficiency that RED AI will make its suggestions.
Janda 6
2.1 Key Product Features and Capabilities
RED AI’s many and diverse features can be divided into four categories: those involving
its database, its installation and platform compatibility, its external systems, the areas of
restaurant efficiency it is capable of improving, and its interface. Of the database related
features, the two most significant are RED AI’s capacity to generate reports and perform
statistical analyses. At the current stage of planning, the scope of these reports is not entirely
known, but they will doubtlessly include the ability to produce optimal schedules, histograms or
other intuitively grasped charts that graph inventory levels, customer flow, profit, expenditure,
staff levels, and the frequency with which menu items are ordered, all against time. To qualify
the statement that “the scope of these reports is not entirely known,” it should be stated that, as
part of the development process, the company will employ a restaurant efficiency consultant to
help with the design of the system, most significantly with the inference rules alluded to
previously, but also with the less impressive sounding aspects of the product that the user will
come into contact with, such as the GUI (Graphical User Interface), the content and layout of the
reports generated by the product, and the data entry forms RED AI generates.
The statistical analysis is the “number crunching” aspect of RED AI. It will correlate
various factors of restaurant functioning with profit. Utilizing such statistical techniques as the
Pearson Product-Moment Correlation, factor analysis, and multiple regression, linearly
independent variables will be isolated and used to produce predictions of what values
controllable variables (i.e. staff levels, magnitude of orders placed with wholesalers, menu item
price) will result in the greatest profit.
Among the external systems, the one most likely to have restaurant managers counting
the days until RED AI arrives is the artificial intelligence engine. The artificial intelligence
Janda 7
component of RED AI will consist of a set of inference rules formulated by the restaurant
efficiency expert that will make suggestions of a more qualitative nature than “staff x waiters at
time t.” Examples of such suggestions include, “Remove three tables from the floor,” “Partition
off a party room,” and, “Buy a dessert cart.” RED AI will offer free subscriptions to an
algorithm update program. Restaurants that choose to participate will allow the company access
to the data stored in their restaurant’s RED AI internal database. This data will be used to
determine the validity of RED AI’s suggestions through the examination of profit and customer
data over the month(s) subsequent to the restaurant employing these qualitative suggestions.
Through this examination of the real-world result of a restaurateur implementing RED AI’s
suggestions, the company will be able to hone the inference rules that the product employs,
allowing customers access to a better artificial intelligence system as well as allowing for the
creation of a better product to market to other restaurateurs.
The features of interest that will benefit restaurant efficiency are that RED AI will cut
labor costs, increase sales, and reduce wait time. It would be an act of supererogation to offer an
explanation other than that it will do so via the implementation of the qualitative and quantitative
suggestions described above. RED AI will also provide the user with the capability to maximize
inventory efficiency as discussed in the parent section and allow for the analysis of various
restaurant layouts. The feature that is likely to be of most interest though is the product’s ability
to simulate the adoption of its own suggestions. This simulator will allow the user to apply RED
AI’s suggestions to data from previous months, producing faux-historical trends for these months
to estimate how the restaurant would have functioned if these suggestions had been in place.
Also of note is that RED AI will be made available for the nominal fee of $100 for an initial
three month subscription period and $100 for each month thereafter.
Janda 8
2.2 Major Components (Hardware/Software)
At the present stage of planning, the software components of RED AI are limited to a
database importer, a mechanism for manual input of data for restaurateurs that choose not to
maintain a database, an internal database, a rule set, an inference engine that to a certain degree
mimics artificial intelligence, and a GUI (Graphical User Interface) that will provide for
interaction with the other components.
Figure 2. Software Major Functional Component Diagram (Red Team, 2007)
The database importer is a software element that allows RED AI to interface with any
database the restaurant might previously utilize or which it might prefer to utilize rather than
manually input data into the RED AI program. Though the use of the word “any” in reference to
the databases RED AI is compatible with might seem grandiose, modern programming
technologies such as ADO.NET allow for easy interaction with all databases and most other
computer-orientated means of storing data such as Microsoft Excel spreadsheets and XML
Janda 9
(Extensible Markup Language) files. In the unlikely event that stores information in tab
delimited text files, a simple importation of these into Microsoft Excel will allow RED AI to
access his data. Also, if the restaurateur has no means of storing data, the product allows him to
manually input whatever range of information he wishes to into RED AI’s internal database.
RED AI’s internal database will take the form of whatever SQL (Standard Query Language –
pronounced “sequel”) server whose manufacturer the company can make agreeable licensing
arrangements with. Standard query language is, indeed, standard and information is inserted into
and retrieved from all SQL databases with the same programming commands.
The set of inference rules that the artificial intelligence engine will utilize will be stored
in a separate file rather than included in the content of the program for ease of update. The
versatility of XML files make them a logical choice for the format of the rule-set data files. The
artificial intelligence engine was originally slated to be developed in Prolog, but due to
uncertainties regarding the availability of a cross-platform Prolog complier that can generate a
compiled code library accessible by the remainder of the system, it has instead been decided that
RED AI will be developed with its own inference engine, discussed in section 3.4. The original
form of the rule-set will be a text file that will be parsed and reduced to lexical tokens for
processing. The code that will be written to parse the text file into tokens can be easily amended
to include a mechanism whereby tokens are placed in a stack and evaluate themselves in a
manner similar to Reverse Polish Notation, producing a true or false value when the parent token
is evaluated that will govern whether a specific suggestion is made. The GUI is the interface the
restaurateur will use to access the systems features. It will allow for the manual input of data,
report generation, and will display both the results of the statistical analyses and the suggestions
the inference engine generates.
Janda 10
2.3 Target Market / Customer Base
The target market for the product is the owners of new restaurants. Greater profits could
certainly be realized by marketing RED AI to national chain restaurants but it has been deemed
overly difficult to convince the boards of such restaurants to invest in site license packages for
each restaurant in the chain; further, it is believed that restaurants newly emerging on the
culinary scene are those most prone to difficulties and therefore those most likely to purchase the
company’s product.
3 RED AI Prototype Description
The RED AI prototype will consist of a limited implementation of the product already
described. As depicted in figure 3, most notable in its limitations are its exclusion of inventory
and menu data from the database, statistical analyses, and artificial intelligence engine;
additionally, statistical analyses will not include the isolation of independent variables or
regression analysis to predict optimum values for the controllable variables. The rule-set
developed for the prototype will be formulated in a rather arbitrary fashion as the company
currently possesses insufficient (no) funds and cannot employ a restaurant efficiency expert to
help with devising rules more nuanced than those that lay within the domain of common sense
and guesswork. The prototype’s database system will likewise be a simplification of that which
would exist in the finished product, as well as the GUI.
Janda 11
Feature
Real World Project
Prototype
Real World
Real World
Random data generated roughly in accordance
with customizable daily, weekly, and monthly
trends using the stimulus simulator
Manual Input
Intuitive user input interface
Intuitive user input interface
External DB import
External DB import
External DB import
Staff data
Staff data
Staff data
Customer data
Customer data
Customer data
Menu data
Menu data
Not included in the prototype
Inventory data
Inventory data
Not included in the prototype
Service efficiency engine
Service efficiency engine
Service efficiency engine with limited rule set
(see below)
Service efficiency rule set
Full-scale, expert reviewed,
rule set
Small scale set of common rules
Menu efficiency engine
Menu efficiency engine
Not included in the prototype
Inventory efficiency engine Inventory efficiency engine
Not included in the prototype
Simulator
Simulator
Not included in the prototype
Output
Windows, MAC, Linux GUI
Windows GUI
Figure 3. Differences Between the Real Product and the Prototype (Caulkins & Bourque, 2008)
3.1 Prototype Functional Objectives
The most technically significant aspects of the prototype will be its ability to perform
limited statistical analyses, its inference engine, and its rule-set. The statistical analyses
predicted to be implemented will be limited to comparing customer and staff levels with gross
Janda 12
profit after staff wages at different time periods. The prototype will use these comparisons to
suggest staff levels that optimize gross receipts after staff wages. Also included in the prototype
will be a mechanism for manually inputting data into the RED AI internal database and the
simulator discussed in section 2.1. The manual input device will consist of a collection of dialog
boxes that will allow the user to input sufficient data to test the statistical analyses and inference
components.
The artificial intelligence engine will employ a single stage inference engine, that is one
that does not recursively attempt to arrive at more elaborate truths by repeatedly iterating through
applicable inference rules to derive further inferences from its initial inferences. The rule-set it
employs will likewise be simplified to contain a small collection of common sense scenarios and
suggestions such as, “If lunch receipts fall below 60% of dinner receipts, suggest that the
restaurant offer lunch specials.”
3.2 Prototype Architecture (Hardware/Software)
The prototype will employ all of the major functional components of the finished product
excluding the manual input of data and the dual external/internal databases. In the stead of the
two database scheme of the finished product, the prototype will operate with a single database
from which it will read and to which it will write. Though this database will be just as capable of
storing actual restaurant operation data, it will instead contain data generated by an external
computer program that will, to the best of the development team’s ability, approximate customer
flow and staffing levels across time as they might exist in restaurants. A database importer will
also be implemented or obtained from the public domain to extract information from this single
database for use by RED AI’s artificial intelligence and statistical analysis systems.
Janda 13
The RED AI prototype will make use of an inference engine that will iterate through the
inference laws in the rule-set and determine whether each applies to the restaurant and, if
applicable, at which time periods. It will then make qualitative suggestions based on which
criteria in the rule-set hold true. The rule-set itself will consist of a small set of rules derived
from the common-sense knowledge that the development team has of restaurant functioning.
The function of these rules will not be to establish the product’s capacity to improve restaurant
function but to test the functionality of the inference engine. Limited numerical analysis will be
employed to compare gross profit after wages at periods with similar customer levels to
determine which staffing scheme is most effective.
The GUI will allow for the generation of a small set of reports including a suggested staff
schedule. It will also be capable of producing a meaningful representation of the information in
the database as well as outputting the results of the statistical and inference-based analyses. For
demonstration purposes, it will allow the user to choose to simulate the adoption of RED AI’s
suggestions for a given set of customer data and display predicted results.
Figure 4 depicts each of these software elements. The entirety of the prototype will be
coded in Visual Basic. The inference rules will be stored in text files, and Microsoft Access will
be used as the database component.
[page break]
Janda 14
Figure 4. Prototype Major Functional Component Diagram (Bourque, 2008)
3.3 Innovative Features of Prototype
Though the overall product certainly contains features that have never been brought
together before, sadly there is not much that is truly innovative in any of the individual
components. The most impressive feature of the prototype from an implementation standpoint
will likely be its ability to simulate the adaptation of RED AI’s suggestions. Though, admittedly,
the simulation will be flawed as the development team will not have the opportunity to juxtapose
the results of the simulation with any real-world implementations of RED AI suggestions,
offering the ability to retroactively apply the product’s suggestions to previous months’ business
and demonstrating how the implementation of these suggestions would have improved profit
margins is the only way for the company to show its product actually works.
Janda 15
3.4 Challenges and Risks
The most daunting task in the development of the prototype is the coding of a rule-set
parser/inference engine. It is most logical to intertwine the two into a set of tokens types capable
of evaluating themselves. Using the aforementioned inference rule, “if lunch receipts fall below
60% of dinner receipts, suggest the restaurant offer lunch specials,” as an example, the
corresponding encountered by the rule parser might take the form, “average_receipts(11, 13) < .6
* average_receipts(17, 21)  suggest_lunch_specials”. To be processed, this statement needs to
be parsed into a stack of tokens that can be executed. First, the parent operator () is removed
and placed on the stack with its two operands, “average_recepits(11, 13) < .6 *
average_receipts(17, 21)” and “suggest(lunch_specials). In turn, the former of the two operands
needs to be parsed for its parent token (<). The end result is the following bulleted of operators
with their corresponding operands:

average_receipts(11, 13)

average_receipts(17, 21)

* (.6, average_receipts(17, 21))

< (average_receipts(11, 13), .6 * average_receipts(17, 21))

 (average_receipts(11, 13) < .6 * average_receipts(17, 21),
suggest_lunch_specials)
These tokens are evaluated in the order they are listed and each is capable of evaluating
itself. For instance, the first is a function token with two arguments or parameters: 11 and 13.
The third is an arithmetic token with two parameters: .6 and average_receipts(17, 21). As
“average_receipts(17, 21)” has already been evaluated when this token is reached, this is a
Janda 16
simple multiplication operation. The forth and fifth elements in the list represent logical
operators. As with the multiplication operator, each operand will have been evaluated by the
time this token is reached. Though the tokens are evaluated in this order, the first token that will
be accessed by the program is the inference operator (). It will be instructed to evaluate itself
and will request the value of each of its operands. Operators with numerical or Boolean (true or
false) values will simply return their numerical or Boolean value. For example, “.6” is a value
token so it will simply provide the value .6 when requested. However, “<” is a logical operator
and in order to provide its value, it must first evaluate itself with its two arguments, neither of
which are value tokens and therefore must likewise be evaluated.
The other significant challenge presented by the development of the prototype is the
creation of the simulator. The simulator needs to process information such as average tableturnover time, the number of customers waiting, and staff performance to generate a reasonably
accurate estimate of each of the uncontrollable variables in the database (i.e. number of
customers seated, tip amount, gross receipts after wages for a given time period). Though it will
be a rather simple matter to determine some of these variables, such as the number of customers
seated, given a known number waiting customers, when an additional table becomes available,
others will doubtlessly involve a bit of statistical analysis and a bit of guesswork.
4 Prototype Demonstration Description
The format of the prototype presentation will be a walkthrough of the prototype’s GUI
screens. These windows will be displayed in an order that will allow for the prototypes
functionality to be demonstrated. Data will be inputted into the prototype and then an analysis
will be run using both the data entered during the presentation and a data in a pre-generated
Janda 17
database. The output of the analysis will be a series of reports representing the restaurant’s
performance during the spans of time the data covers as well as quantitative and qualitative
suggestions whose adoption will be simulated over for a similar set of data presumed to represent
subsequent weeks of restaurant operation and new reports will be generated to demonstrate an
increase in restaurant efficiency.
Janda 18
References
Baroque, Patrick. (2008) Prototype Major Functional Component Diagram. Retrieved February
26, 2008 from http://daveserv.net//cs411red/doku.php?id=images.
Caulkins, Alex and Baroque, Patrick. (2008) Differences Between the Real Product and the
Prototype. [Figure #4]. Retrieved February 26, 2008 from http://daveserv.net/
cs411red/doku.php?id=images.
Red Team. (2007). Least Common Denominators of Profit. [Figure #1] Figure created during
CS410 at Old Dominion University.
Red Team. (2007). Software Major Functional Component Diagram. [Figure #2]. Figure
created during CS410 at Old Dominion University.
Restaurant Failure Rates Recounted: Where Do They Get Those Numbers? (2008). Sidney, G.
Retrieved February 4, 2008 from http://www.restaurantowner.com/public/302.cfm.
Janda 19
Glossary
ADO.NET – A collection of software available with Microsoft’s Visual Studio .NET
development suite that allows for easy access to data sources.
Artifical Intelligence Engine – see inference engine
Database Importer – A software tool that allows for the importation of data from a database into
a computer program.
Dependent Variable – A variable whose value is dependent on the value of another variable.
Factor Analysis – The process of determining which predictive variables in a data set are
independent of one another in their predictive capacity.
GUI – Graphical User Interface. An onscreen display that allows a user to interact with a
computer program.
Inference Engine – A program that makes logical inferences given a set of rules.
Multiple Regression – A statistical tool that allows the prediction of a dependent variable’s value
from a set of independent variables.
Pearson Product Moment Correlation – A number between zero and one that quantifies the
degree to which two sets of data are related.
Reverse Polish Notation – An input scheme developed by Hewitt Packard scientists whereby
both operands are entered before the operator. For example, while a regular calculator
takes input such as “2 + 2 =”, a Reverse Polish Notation calculator would require the
same input to be entered as “2 enter 2 +”.
Stack – A structure that exists in the computer’s memory. It is a list of elements that can only be
retrieved in the reverse of the order the elements were inserted into the structure.
Janda 20
SQL – Standard Query Language. A standardized set of programming commands for inserting,
removing, and retrieving data from a database.
SQL Server – A database that is accessed via SQL.
Visual Basic – One of the programming languages available in Microsoft’s Visual Studio
development suite.
XML – Extensible Markup Language. A text-based data storage scheme.
Download