PHP Artificial Intelligence Program (PAIP)

Status
Not open for further replies.

marles

Member
Feb 5, 2011
34
2
Hi there, Just 10 day's ago, i got this crazy idea to make an artificial intelligence program in php. I called it PHP Artificial Intelligence Program or for short P.A.I.P .

Currently planning
  • Talk to us as any other human would (random words like "how are you")
  • GUI
Currently done
  • The database
  • The actual site
  • Learning new words as it communicates with us
  • Answer questions
Some preview codes (v2 BETA)
PHP:
<?php
error_reporting(0);
include "arrays.php";
include 'response.php';
$xml = new SimpleXMLElement($xml);
$server_host = $_SERVER["HTTP_HOST"];
$ip = $_SERVER["SERVER_ADDR"];
$agent = $_SERVER["HTTP_USER_AGENT"];
?>
<html>
<head>
<title>PHP Artificial Intelligence Program</title>
<style>
#output
{
    margin-top: 30px;
    margin-left:-190px;
    font-family: 'lucida grande',tahoma,verdana,arial,sans-serif;
    font-size: 11px;
    line-height: 1.28;
    width:425px;
    height:10px;
    padding:10px;
    float:left;
    text-align:left;
    border-bottom: 5px solid rgb(160, 181, 50);
}
#footer
{
    font-size: 11px;
    color: rgb(255, 255, 255);
    background: url("img/footer.png") repeat-x scroll 0px 50% rgb(85, 85, 85);
    margin-top: 5px;
    border-radius: 3px 3px 3px 3px;
    overflow: hidden;
    box-shadow: 0px 1px 0px rgba(255, 255, 255, 0.4) inset, 0px 0px 1px rgba(255, 255, 255, 0.7) inset;
    text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.3);
    height:20px;
    width:920px;
}
.footerLinks 
{
    padding-right: 5px;
    float: right;
    overflow: hidden;
}
.tabs 
{
    position: relative;
    margin: 10px 0px 0px;
    font-size: 12px;
    font-weight: bold;
    background-color: rgb(234, 234, 234);
    background-image: linear-gradient(rgb(250, 250, 250), rgb(234, 234, 234));
    background-repeat: repeat-x;
    border-width: 1px;
    border-style: solid;
    border-color: rgb(234, 234, 234) rgb(234, 234, 234) rgb(202, 202, 202);
    -moz-border-top-colors: none;
    -moz-border-right-colors: none;
    -moz-border-bottom-colors: none;
    -moz-border-left-colors: none;
    border-image: none;
    border-radius: 3px 3px 0px 0px;
    width:920px;
    padding:0px;
}
.tabs li 
{
    list-style-type: none;
    margin: 0px;
    display: table-cell;
    width: 1%;
}
.tabs li a 
{
    display: block;
    text-align: center;
    line-height: 35px;
    font-size: 12px;
    color: rgb(119, 119, 119);
    text-decoration: none;
    text-shadow: 0px 1px 0px white;
    border-right: 1px solid rgba(0, 0, 0, 0.04);
    border-left: 1px solid rgba(255, 255, 255, 0.7);
    border-bottom: 2px solid rgb(218, 218, 218);
}
.tabs li a:hover {
    color: rgb(0, 0, 0);
    background-color: rgb(235, 235, 235);
    background-image: linear-gradient(rgb(252, 252, 252), rgb(235, 235, 235));
    background-repeat: repeat-x;
    border-bottom: 2px solid rgb(210, 105, 17);
}
.tabs li a.selected
{
    border-bottom:2px solid rgb(210,105,17);
}
#content {
    position: relative;
    margin-bottom: 10px;
    font-size: 12px;
    color: rgb(51, 51, 51);
    padding: 10px;
    background: none repeat scroll 0% 0% rgb(250, 250, 250);
    border-right: 1px solid rgb(221, 221, 221);
    border-width: 1px;
    border-style: solid;
    border-color: rgb(255, 255, 255) rgb(221, 221, 221) rgb(221, 221, 221);
    -moz-border-top-colors: none;
    -moz-border-right-colors: none;
    -moz-border-bottom-colors: none;
    -moz-border-left-colors: none;
    border-image: none;
    width:899px;
    height:500px;
}
#seperator
{
    border-bottom: 5px solid rgb(160, 181, 50);
    border-right: 5px solid rgb(160, 181, 50);
    border-left: 5px solid rgb(160, 181, 50);
    width:1000px;
}
.button:hover
{
    background:#759ed1;
    color:#FFF;
}
.button 
{
    position: relative;
    display: inline-block;
    padding: 0px 10px;
    font-family: Helvetica,arial,freesans,clean,sans-serif;
    font-size: 13px;
    font-weight: bold;
    line-height: 24px;
    white-space: nowrap;
    border-radius: 3px 3px 3px 3px;
    cursor: pointer;
    -moz-user-select: none;
    text-shadow: 0px 1px 0px rgb(255, 255, 255);
    border-width: 1px;
    border-style: solid;
    border-color: rgb(212, 212, 212) rgb(212, 212, 212) rgb(188, 188, 188);
    -moz-border-top-colors: none;
    -moz-border-right-colors: none;
    -moz-border-bottom-colors: none;
    -moz-border-left-colors: none;
    border-image: none;
    background-color: rgb(234, 234, 234);
    background-image: linear-gradient(rgb(250, 250, 250), rgb(234, 234, 234));
    background-repeat: repeat-x;
}
#news
{
    float:right;
    width:440px;
    height:50%;
    border-left: 5px solid rgb(160, 181, 50);
    border-bottom: 5px solid rgb(160, 181, 50);
    border-bottom-left-radius:5px;
}
</style>
</head>
<body>

<center style="margin-top:-10px;">
<div id="seperator">
<div id="top" style="padding-top:5px;">
    <ul class="tabs">
        <li><a href="#" class="selected">Home</a></li>
        <li><a href="#">Help</a></li>
        <li><a href="#">News</a></li>
    </ul>
</div>
<div id="content">

    <form style="float:left;">
    Message: <input type="text" name="message"  id="message" onkeyup="message(this.value)">
    </form>

    <div id="output">
        <?php
            $message = $_GET['message'];
            if(in_array($message,$greetings_array))
            {
            echo $xml->category[1]->template;
            }
        ?>
    </div>
    
    <div id="news">
        <h3>Server Status</h3>
        <br></br>
        <br>Server IP: <?php echo $ip; ?></br>
        <br>Server Host: <?php echo $server_host; ?></br>
        <br>Server Agent: <?php echo $agent; ?></br>
        <div class="button">Button</div>
    </div>
</div>
</div>
<div id="footer" style="background-color: rgb(214, 34, 34);">
    <div class="footerLinks">
        Powered By P.A.I.P
    </div>
</div>
</center>
 

Kryptos

prjRev.com
Jul 21, 2010
2,205
1,252
That's not AI at all, you're just hardcoding responses to messages. Although good on trying new stuff, etc - it's not AI at all.
 

Quackster

a devbest user says what
Aug 22, 2010
1,764
1,241
AI means it will learn over time and have more cocky answers and take on a normal human characteristic ;)
 

marles

Member
Feb 5, 2011
34
2
The one thing i know is AIML. I am still learning the language
 
Status
Not open for further replies.

Users who are viewing this thread

Top