Search This Blog

Thursday, December 14, 2017

SUSHIVERY

Sebelumnya karena ini adalah tugas kelompok maka saya akan memeperkenalkan anggota saya terlebih dahulu.
  1. Hidayatul Munawaroh (5115100054)
  2. Cynthia Dewi T (5115100074)
  3. Vincentius (5115100159)
DESKRIPSI
Untuk tugas Final Project Topik Khusus Algoritma dan Pemrograman ini kami membuat game sushi delivery. Dalam game ini pemain akan menyampaikan pesanan pelanggan dari rumah-rumah ke toko sushinya, setiap pesanan akan diantarkan oleh satu mobil. Untuk rute yang akan dilalui oleh pengirim sushi kami tentukan dengan menggunakan algoritma shortest path A*. Saat game dimulai pertama kali maka sistem akan mencari shortest path ke semua rumah-rumah dari setiap toko sushi, dalam game ini terdapat 2 toko dan 12 rumah. setelah itu barulah sushi pesanan dari rumah-rumah akan muncul, saat itu barulah pemain akan berperan untuk menyampaikan pesanan tersebut ke toko agar segera diantarkan. Game ini akan berakhir saat poin pemain sudah mencapai 200, penghitungan poinnya adalah setiap sekali pengantaran akan menerima 10 poin, jad untuk menang minimal harus mengirimkan 20 sushi.
A*
Merupakan algoritma  pencarian graf yang mencari jalur dari satu titik awal ke sebuah titik akhir yang telah ditentukan. Algoritma A* menggunakan pendekatan heuristik h(x)  yang memberikan peringkat ke tiap-tiap titik x dengan  cara memperkirakan rute terbaik yang dapat dilalui dari titik tersebut. Setelah itu setiap titik x tersebut dicek  satu-persatu berdasarkan urutan yang dibuat dengan  pendekatan heuristik tersebut. Algoritma ini meupakan engembangan dari algoritma Best First Search.
STORYBOARD

saat pertama mulai money (poin) akan diset menjadi 0, selanjutnya muncul beberapa pesanan sushi di beberapa rumah, selanjutnya adalah tugas pemain untuk menyampaikan pesanan sushi tersebut ke toko.

diatas adalah tampilan proses pengantaran sushi ke rumah pemesan.

pesanan-pesanan sushi akan terus bermunculan hingga pemain mendapatkan minimal 200 poin money.

setelah mencapai poin 200 maka pemain tersebut telah menyelesaikan misi yang diberikan.
SOURCE CODE
Untuk sprite mobil :

Untuk sprite sushi :

Untuk sprite "YOU WIN" :

Berikut adalah program scratch kami ;
Berikut adalah link untuk download apk dari game yang telah kami buat

Terimakasih, sekian untuk post kali ini semoga bermanfaat.

Thursday, October 19, 2017

Beaver Lunch (UTS TKAP)

Nama            :  Cynthia Dewi Tejakuusma
NRP              :  5115100074
Tugas            :  Beaver Lunch (UTS TKAP)

This simulation is to show whether the beaver's lunch is proper.
Rule :
1. Below the tray there are different food containers.
2. The numbers beside the food containers are to tell how many containers of this type can be added to the tray.
3. The numbers beside the food are to tell how may food of this type can be added to the food container.
4. To reset all the variables click the flag.
5. To update the currently situation press space. (To see whether it is proper, you need to press space once more)

Thursday, September 28, 2017

Selection Sort Visualization

In computer scienceselection sort is a sorting algorithm, specifically an in-place comparison sort. It has O(n2time complexity, making it inefficient on large lists, and generally performs worse than the similar insertion sort. Selection sort is noted for its simplicity, and it has performance advantages over more complicated algorithms in certain situations, particularly where auxiliary memory is limited.
The algorithm divides the input list into two parts: the sublist of items already sorted, which is built up from left to right at the front (left) of the list, and the sublist of items remaining to be sorted that occupy the rest of the list. Initially, the sorted sublist is empty and the unsorted sublist is the entire input list. The algorithm proceeds by finding the smallest (or largest, depending on sorting order) element in the unsorted sublist, exchanging (swapping) it with the leftmost unsorted element (putting it in sorted order), and moving the sublist boundaries one element to the right.


This is my visualization of selection sort made using scratch.mit.edu.