Planet Chili Algorithm Challenge 1

The Partridge Family were neither partridges nor a family. Discuss.
User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Planet Chili Algorithm Challenge 1

Post by chili » August 30th, 2017, 12:29 pm

Given an arrangement of numbers (call it a 'pyramid') such as:

Code: Select all

        2
       6 3
      6 5 9
     1 2 9 3
The maximum path from top to bottom is: 2 -> 3 -> 9 -> 9 = 23

Paths run top to bottom and only progress through 'neighboring' values (2->6->9->9 would be impossible, for example).

Find the value of the maximum path for the pyramid given in the text file attached below.

For further explanation, see this video: https://youtu.be/T-SLD0x8XrU

You may ask clarification questions on this thread or have related discussion, but DO NOT POST THE SOLUTION / CODE.

The solution is given in this video: https://youtu.be/0yUNpWfioQg
Attachments
pyramid.zip
(98.23 KiB) Downloaded 500 times
Chili

goldengamesTM

Re: Planet Chili Algorithm Challenge 1

Post by goldengamesTM » August 30th, 2017, 1:45 pm

When I opened the file in note pad it was messed up. Like this.
Attachments
Capture.PNG
(55.73 KiB) Not downloaded yet

goldengamesTM

Re: Planet Chili Algorithm Challenge 1

Post by goldengamesTM » August 30th, 2017, 1:51 pm

The solution(sorry).

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Planet Chili Algorithm Challenge 1

Post by chili » August 30th, 2017, 1:57 pm

it matters not how it looks in notepad, only how you will read it in your program

on a side note, notepad is garbage, get notepad++ ;)
Chili

goldengamesTM

Re: Planet Chili Algorithm Challenge 1

Post by goldengamesTM » August 30th, 2017, 2:08 pm

Alright.

goldengamesTM

Re: Planet Chili Algorithm Challenge 1

Post by goldengamesTM » August 30th, 2017, 2:14 pm

How do I PM you?

Edit: Really!? I saw the PM button seconds after I asked.

albinopapa
Posts: 4373
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: Planet Chili Algorithm Challenge 1

Post by albinopapa » August 30th, 2017, 6:59 pm

I'll be shocked to see someone not in a Uni course get this one right. Chili is really big into AI and this makes me think the solution will require knowledge of MINIMAX ( minimum risk, maximum reward ).

I'm going to assume the result will not depend on the depth of the "tree", since you will not always know or won't always be able to calculate the depth because of complexity or memory requirements?
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com

StarPirate202
Posts: 1
Joined: August 30th, 2017, 6:51 pm

Re: Planet Chili Algorithm Challenge 1

Post by StarPirate202 » August 30th, 2017, 7:03 pm

Do we only need the maximum path value? Should the program write 2 -> 3 -> 9 -> 9 or only 23?

Xenox
Posts: 4
Joined: January 16th, 2015, 7:17 pm

Re: Planet Chili Algorithm Challenge 1

Post by Xenox » August 31st, 2017, 12:37 am

@albinopapa, the task is to write a program which will calculate the max-path only for this txt file. There are less than 421^2 variables in this file, so no memory problems.

MrGodin
Posts: 721
Joined: November 30th, 2013, 7:40 pm
Location: Merville, British Columbia Canada

Re: Planet Chili Algorithm Challenge 1

Post by MrGodin » August 31st, 2017, 1:04 am

I'm thinking of a hash table... gotta try this challenge. somehow i think it'll go bottom to top... probably wrong but i'll try :P
Curiosity killed the cat, satisfaction brought him back

Post Reply