The topic of Intelligent System in the first week was about the introduction of AI and also the course introduction. A video were presented explaining detail about Artificial Intelligence. The video explain about the history of AI, the defintion of AI & Machine Learning, and how the system acts & thinks like human brains. Here is the short summary:
John McCarthy, father of AI is the person who has coined the term of Artificial Intelligence in 1956 and also invented the programming language lisp in 1958.
We were explained about the difference between the AI and Machine Learning. In short, Artificial Intelligence (AI) is the big concept of how the machines thinks and acts like human, whereas the Machine Learning (ML) is the subset of AI technique which use the experience (dataset) to improve the performance and accuracy.
After that, Ms Nurul also mentioned that AI has 4 components which are Thinking Humanly, Thinking Rationally, Acting Humanly, Acting Rationally. We also learned about the Nature of AI which not only always Computer Science related things, but also including the philosophy, psychology, biology, economics, mathematics, linguistics and cognitive science.
Before went to the second topic, Ms Nurul also mentioned some of the implementation of AI nowadays, such as the Intelligent Robots: Aibo, Machine Translation, Speech Recognition, Drug discovery, etc.
The second topic was about Intelligent Agent Design. We learned about the defition which perceives its environments using sensors and act rationally upon that environment using actuators, we learned how to measure the Task Environment, the types of environments to determine agent design.
In order for a company to function it must have a system to organize its own resources. One resource that is crucial yet sometimes overlooked is human resources. A company must at all times have access to all the required data related to an employee. The required data includes but not limited their wages, leave allowances, work ratings, contract type, etc. in today’s era HR becomes a given when talking about any workplace.
In the interview we conducted we have surmised that a significant number of HR managers still have all their data in excel. This has its own share of problems such as field organization, scalability, and data integrity. We asked a number of questions such as “what do you use to store data?” and “What do you think can be improved?”. The answers we obtained as well as research results led to our conclusion that database might be a better means of data storage for this matter. Hence we have come up with the following problem statement:
How can the usage of databases improve the efficiency of an HR department in a company?
The above is the end goal of the project where everything is based on. Deliberations towards UI design, transaction requirements all have the above basis for the overall design of it.
Team members and Roles:
Rio Adi Nugraha: Database Designer, Database implementation, Interviewer
My job is to interview the target audience and then design the database to suit the needs of the company. I was given the excel spreadsheet with limited data. My job is to convert this excel spreadsheet into a cohesive relational database. I contribute with implementing the database into a server. Creating the table and connecting the foreign key is also part of my responsibility. After the product is complete and in between it is also my responsibility to communicate with the client to see if the product suits their preferences.
Hengky Sanjaya: Database Designer, Programmer
I am responsible to design the outline of database tables with team. Analyze the data from the company given in excel format and translate into the relational tables. Create and build the application in desktop platform with technologies of C# as main programming language and MySQL as database storage. Responsible to build features of application such as login, register employees, entry employee data, report, import data, etc.
Ryan Rusli: Database Designer, Programmer
I am responsible for designing a majority of the class models of the program and for most of the data management interface. I also contributed in the design of the database table with the other group members. I also handled most of the data insertion, retrieval, update and deletion functions and interactions with the database. I also created the employee management page which manages email, phone, address and job history.
Naufal F. Basyah: Report Check and Miscellaneous
I am mostly responsible for the report checks and details that need to be made i.e. ERD and relation description. I also contribute in a smaller scale in miscellaneous task as an extra pair of hands.
The first normal form dictates all the attribute within a relation needs to be single valued. This means that multiple valued attributes such as if a person has 2 jobs is converted into values within different rows. It is difficult to show that within the above diagram. There are examples showing this possibility was closed with our design. For example if an employee has multiple phone numbers. These phone numbers will have unique phone ID generated hence does not depend on the person rather it depends on the ID. There are some attributes we assume will be singular such as gender,KTP,and Nickname. With the condition set that these values are singular then all attributes should be singular in nature therefore adhering to the first Normal Form.
The second normal form dictates that there exists no partial dependency no non-prime attribute is dependent on any other subset of the primary key. Because we designed it in a way that all the tables have a unique primary key every attribute is determined by their respective primary key. The lack of composite keys means that no partial dependency is present within the database. Some of the tables might seem necessary however we designed it so it would be customizable if required later on.
The third normal form dictates there exists no transitive dependency between the columns. As shown previously all the attributes within a relation are dependent on their respective primary key and by extension and definition this allows the database to be in third normal form.
Sample queries
provide some samples queries (at least 5) to generate reports
Sample 1:
Query to generate the number of employees from both genders.
“SELECT Gender, count(*) ‘total’ FROM Employee GROUP BY Gender”
Sample 2:
Query to generate the number of employees for each marital status (single, married, divorced).
“SELECT MaritalStatus, count(*) ‘total’ FROM Employee group by MaritalStatus”
“SELECT * FROM employee e JOIN employeefamily ef ON ef.nik = e.nik join employeeaddress ea ON ea.employeenik = e.nik JOIN employee_phones ep ON ep.nik = e.nik where e.nik IN (SELECT nik FROM transaction WHERE enddate < now());”
Sample 5:
Query to generate a report that provides information on the amount of employees in the age groups of under 20 years old, between 20 and 30 and between 31 and 40.
WHERE enddate < now() AND (tr.positionid = 1 or tr.departmentid = 1)
) AS t
ON e.nik = t.nik;
User Interface
Login Screen:
Main Form:
Options Available On the Headers:
Adding New Employee:
Entering Employee Family Information:
Selecting Employee
Adding Employee Family Relationship
Deleting Relationship
Entry Phone Data
Entry Email Data
Entry Address Data
Entry Education Data
Entry Job History Data
Register New Employee
Edit Transaction
Bank Management:
Branch Management:
Contract Management:
Department Management:
Level Management:
Position Management:
Transaction Type Management:
Employee Report:
Transaction Report:
Employee Recap Data
Importing CSV Files:
Imported data will be inserted into the database.
Database Security
User access management
There is only one admin set to work within the database. This admin controls users underneath it. Meaning the admin has the power to limit or grant more access to the database if so required. In a company setting it means that a singular admin or super admin can delegate parts of the work to their underlings. Since this is targeted towards HR, an HR manager can give some access to the employee. This access can vary from just view only or (write and view). The default is view only. This means that some other employees that don’t need to edit can use it as a reference for views. Furthermore this prevents unauthorized personnel from compromising the data within the database.
SQL injection countermeasures
The code incorporates methods to counteract SQL injections. The main one being the handling of Prepared Statements. Look at the screenshot below
As you can parameters addwithvalue is added within the code which would mean that the user is forced to to insert the data in at least a suitable form so if for example a query added DROP TABLE query after the original query it would not register as that and would instead simply be a string therefore preventing major vulnerabilities in the form of SQL injections.
The above screenshot also shows the username and password countermeasures against sql injections. As seen in the screenshot username and password being the likely target of injections have addwithvalue functions thereby creating a barrier for sql injections from running within the server. Furthermore, it also adds an if function that checks if the correct username and password is detected to prevent users with unauthorized privileges from disrupting the data
CONCLUSION
In conclusion we were tasked with creating a database based on a certain company’s excel spreadsheet that fulfills the same capabilities as the original spreadsheet. Through this spreadsheet we created an ERD that has all the required links while also fulfilling the criterias to be in third normal form. Afterwards we created the database within mysql and tested it to make sure it is in working condition. Lastly we then coded it within visual studio in order to create a cohesive UI that integrates this database with pre built queries.
I am responsible to design the outline of database tables with team. Analyze the data from the company given in excel format and translate into the relational tables. Create and build the application in desktop platform with technologies of C# as main programming language and MySQL as database storage. Responsible to build features of application such as login, register employees, entry employee data, report, import data, etc.
In order for a company to function it must have a system to organize its own resources. One resource that is crucial yet sometimes overlooked is human resources. A company must at all times have access to all the required data related to an employee. The required data includes but not limited their wages, leave allowances, work ratings, contract type, etc. in today’s era HR becomes a given when talking about any workplace.
In the interview we conducted we have surmised that a significant number of HR managers still have all their data in excel. This has its own share of problems such as field organization, scalability, and data integrity. We asked a number of questions such as “what do you use to store data?” and “What do you think can be improved?”. The answers we obtained as well as research results led to our conclusion that database might be a better means of data storage for this matter. Hence we have come up with the following problem statement:
How can the usage of databases improve the efficiency of an HR department in a company?
The above is the end goal of the project where everything is based on. Deliberations towards UI design, transaction requirements all have the above basis for the overall design of it.
Target User
The target user is an HR manager of a company. Currently, according to our interview there are plenty of HR managers who use excel as their main source of data storage. This has a suite of problems we are trying to solve by converting that data storage into a database. This in theory should ease their workload and apply scalability to the system.
Our game is an endless type of game where the aim is to accumulate the highest possible score. The theme of this game is survival. This game takes place on a farm where the player acts as the herder to the farm animals. The player will gain score/gold by collecting the farm animals’ produce which spawn periodically. Every 20 seconds, a pack of wolves will spawn and try to hunt down all of the farm animals and the player should try to protect the farm animals by killing the wolves.
Empathy
The chicken and cow represent the animals in the world. Whereas, wolf represent some people who hunt animals carelessly without the feel of humanity. The empathy of this game is to tell people to conserve and to take care of animals in the world in order to prevent the extinction of animals whose numbers are getting fewer.
Background
Our game takes place in a farm far away from the city. In a place where wolves are in abundance. The hero whom you play as is tasked to fend off the bloodthirsty wolves who threaten your livestock. By collecting resources produced by your animals, you will be able to purchase more animals or upgrades to increase your hero’s strength. Resist the endless stream of wolves for as long as you can!
How to play the game
The player starts the game with 5 gold which can be used to purchase farm animals(chicken: 5 gold, cow: 45 gold). Every few seconds the farm animals will drop their produce that can be clicked to gain score(chicken will drop an egg every 10 seconds that give you 5 gold, cows will produce milk every 15 seconds that give you 15 gold).
The player can purchase animals by holding the number located in the top left of the slot and left click on the location where you want to spawn the animal or you can simply click the animal and then the location.
The player can purchase clicker upgrades by holding down ‘3’ on the keyboard and left click or click on the cursor slot.
The player starts with 3 lives. If an animal gets eaten by (collides with) a wolf, one life will be deducted.
The player loses if:
Life count drops to 0
The player has 0 money and 0 animals left on screen
Player Control
The available keys for player control on the keyboard is the ‘1’, ‘2’, and ‘3’ key and the game mainly focuses on the use of mouse/trackpad clicks.
Team Member Contributions
Hengky Sanjaya: Graphics, Main Menu, report, etc.
Ryan Rusli: Main game, Main Menu, report, etc.
Robert Reden: Report, Main Game Settings, etc.
Game Application
Music
Add music if you think that music is very important for your game and help the player. Make sure the player has the option to turn off the music.
Score
It’s better your game has a HUD to keep the score or time or anything that important always available for your players
Help Page
A help page that explain how to play your game
About Page
An about page that contains all team members’ name and how to contact you, an email is better
Resources Page
A page that contain a list everything that you got from the internet with the link of the sources
List of Items Created by us
– Main menu
– How to play popup image
– Settings menu
– High score page
Game Background/ Images Explanations
This was the main background we used for all our menus, excluding the settings section. The reason we chose this background was as it depicts a very calming scenery and atmosphere, it is something that is usually visualized when someone imagines a farm. Furthermore, it accompanies the sprites of the animals well as they also provide the same image towards the farm.
The reason we chose these images for our animals as they portray innocent and harmless characters.
We chose a wolf as the game enemy as it is a common animal that threatens normal livestock. It is also frequently used in other games/movies as a hostile creature.
Our game communicates the current state of the program clearly allowing users to feel comfortable and in control of the system. Our program has explicit commands for controlling what is going to happen in the game that will enable the users to have better decision making. The users are able to see the current score, amount of coins they have, etc. We have a main menu page that explains what to do to the users which is separated from the gameplay. The users will not feel confused with what is happening on the screen.
Match Between System and the Real World
Our program uses familiar language to the users that is the convention in many games so the users will not be confused with our interface. Our game is set in a grassland and uses farm animals such as chicken and cow which the users will not feel unfamiliar with, we also used several common icons such as coin,pause button,exit door so the users will get better user experience when playing our game.
User control and Freedom
Our game has a pause button, exit button, and a replay button, giving the users full control of the system functions so the users won’t have to finish the game to be able to exit the game and also the users have the freedom to choose the item (chicken,cow,etc) by using keyboard shortcut or by using cursor.
Consistency and Standards
Our program follows the standard in the vocabulary of the words used to the placement of the buttons allowing the user to have proper navigation over the system. Our game follows the convention of most games in button placement and the features of every button so the users will know where to look for what features. We also applied the same style in our game such as the buttons, the pop up modal, color scheme, etc.
Error Prevention
Our program doesn’t have any error prevention because of the event limitation in
Construct2. But we have made a design for error prevention in the game, it is just not implemented into the game itself.
Recognition Rather than Recall
Our game promotes recognition rather than recall by making the interface function and information available, easy to be remembered, and easily accessible by the user. It doesn’t require the user to memorize anything, the tutorial of the game is available in the main menu of the game.
Flexibility and Efficiency of Use
Our program is suited for both experienced and inexperienced users. It contains almost everything needed for a game to function and the users will not feel deprived of any feature.
Aesthetic and Minimalist Design
The visuals of our interface has a minimalist design, it looks simple and pleasing to the eye. There are no irrelevant or useless information displayed in our interface. The user will feel comfortable looking at our interface as everything is clear and visible.
Help Users Recognize, Diagnose, and Recover from Errors
Our program doesn’t display any error messages due to the event limitations in Construct2 but the design for these have been made.
Help and Documentation
Our program has a tutorial which the user can access from the main menu of the game that explains how to play the game. There is also a button to access the resources for the objects used in making this game and also a button to display the creators of this game and their contact info.